TabStop无法在纯Win32应用程序上运行 [英] TabStop not working on a pure Win32 Application

查看:55
本文介绍了TabStop无法在纯Win32应用程序上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。

请问,我正在开发一个程序扩展的DLL,用于西门子的一个名为Unigraphics的CAD / CAM程序,它就像一个插件。

Please, I'm developing a DLL that is a program extension for a CAD/CAM program called Unigraphics from Siemens, it is something like a plugin.

这个DLL使用CreateWindowEx创建一个窗口,并使用CreateWindowsEx向第一个创建的窗口添加几个标准控件,如文本框,复选框和按钮(让我们将其称为主窗口)。我必须使用CreateWindowxEx而不是CreateDialog,
否则它无法与主应用程序通信(在这种情况下为Unigraphics)。

This DLL creates a window using CreateWindowEx and add several standard controls like text boxes, check boxes and buttons also using CreateWindowsEx to the first created window (let's call it my main window). I must use CreateWindowxEx instead of CreateDialog, otherwise it cannot communicate with the main application (Unigraphics in this case).

Everithing工作正常。创建窗口,控件添加到窗口等等。

Everithing works fine. The window is created, the controls are added to the window and so on.

问题是TAB键不会将焦点转发到下一个控件。例如:我添加的一个控件是一个香草多行文本框。当我按TAB键时,文本框输出TAB字符,就像RichEdit控件将
而不是 将焦点转移到链中的下一个控件。使用按钮对象时按下TAB键等没有任何反应。

The problem is that the TAB key does not forward the focus to the next control. For example: One of the controls I've added is a vanilla multi line text box. When I press the TAB key, the text box output the TAB character like a RichEdit control would do instead of forward the focus to the next control in the chain. With a button object nothing happens when I press the TAB key and so on.

所有控件都是使用WS_TABSTOP样式属性创建的,包括第一个(主)窗口。我还将WS_EX_CONTROLPARENT添加到第一个(主)窗口扩展样式以及WS_GROUP标准样式。没有任何改变。

All the controls were created with the WS_TABSTOP style attribute, including the first (main) window. I've also added the WS_EX_CONTROLPARENT to the first (main) window extended styles as well the WS_GROUP standard style. Nothing changed.

我正在使用VC ++ 2010 express。我也尝试过使用CGG,但得到的结果相同。

I'm using VC++ 2010 express. I've also tried with CGG but got the same results.

有人可以帮我解决这个问题吗?我在MSDN上看到了这篇文章( http://support.microsoft.com/?kbid=165074 )但我无法我们想出了如何在具有标准
WindowProc消息循环的Win32应用程序上实现它。我也不确定这个解决方案是否适用于我的问题。

Does anybody can help me with this problem? I saw this article (http://support.microsoft.com/?kbid=165074) at MSDN but I couldn't figured out how to implement it on an Win32 app that have a standard WindowProc message loop. I'm also not sure if this solution applies to my problem.

非常感谢,

Rodrigo

 

推荐答案


这DLL使用CreateWindowEx创建一个窗口,并使用CreateWindowsEx向第一个创建的窗口添加几个标准控件,如文本框,复选框和按钮(让我们将其称为主窗口)。我必须使用CreateWindowxEx而不是CreateDialog,
否则它无法与主应用程序通信(在这种情况下为Unigraphics)。
$


Everithing工作正常。创建窗口,控件添加到窗口等等。
$
问题是TAB键不会将焦点转发到下一个控件。

This DLL creates a window using CreateWindowEx and add several standard controls like text boxes, check boxes and buttons also using CreateWindowsEx to the first created window (let's call it my main window). I must use CreateWindowxEx instead of CreateDialog, otherwise it cannot communicate with the main application (Unigraphics in this case).

Everithing works fine. The window is created, the controls are added to the window and so on.
The problem is that the TAB key does not forward the focus to the next control.

我怀疑你需要(以某种方式)确保为容器窗口调用IsDialogMessage为

。请参阅IsDialogMessage中的备注

文档。

I suspect you need to (somehow) ensure that IsDialogMessage is called
for your container window. See the remarks in the IsDialogMessage
documentation.

Dave


这篇关于TabStop无法在纯Win32应用程序上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆