对话框上面有一个CEdit,该CEdit设定ES_NUMBER属性,
输入非数字时,在父窗口弹出不知名的窗口。
如下图:

经检查发现是父对话框设定了WS_EX_TRANSPARENT属性。
将该属性去掉就OK了。。
-
WS_EX_TRANSPARENT Specifies that a window created with this style is to be transparent. That is, any windows that are beneath the window are not obscured by the window. A window created with this style receives WM_PAINT messages only after all sibling windows beneath it have been updated.
本文讨论了在对话框中使用CEdit控件时遇到的问题,当设置WS_EX_TRANSPARENT属性后导致输入非数字时在父窗口弹出不知名窗口的现象。通过移除WS_EX_TRANSPARENT属性,问题得以解决。

910

被折叠的 条评论
为什么被折叠?



