读书人

怎么实现鼠标焦点不在对话框时销毁该

发布时间: 2012-04-03 12:38:19 作者: rapoo

如何实现鼠标焦点不在对话框时,销毁该对话框
点击edit空间弹出字定义的键盘对话框,如何实现鼠标焦点不在该对话框时,销毁该对话框


[解决办法]
::GetFocus()
Return Values
The handle to the window with the keyboard focus indicates success. NULL indicates that the calling thread’s message queue does not have an associated window with the keyboard focus.

看返回的句柄是不是对话框的

[解决办法]
DestroyWindow销毁
[解决办法]
WM_KILLFOCUS

读书人网 >VC/MFC

热点推荐