首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

使用EndDialog关闭非模态对话框,会不会有有关问题

2013-07-01 
使用EndDialog关闭非模态对话框,会不会有问题?使用EndDialog关闭非模态对话框,会不会有问题?在前面create

使用EndDialog关闭非模态对话框,会不会有问题?
使用EndDialog关闭非模态对话框,会不会有问题?

在前面create了一个对话框,后面关闭这个对话框的时候用的是EndDialog,这样用有问题吗?

是不是必须得用DestroyWindow呢?
[解决办法]
有问题哦, EndDialog 是只能用于模态对话框的.
[解决办法]
模态对话框有自己的消息循环
暂时阻断父窗口所在的消息循环.

[解决办法]
Remarks
The DestroyWindow function does not support the WM_PARENTNOTIFY message.

DestroyWindow destroys children of the specified window.

DestroyWindow does not flush the thread message queue.

Do not use DestroyWindow in one thread to destroy a window created by a different thread.

[解决办法]
post个自定义消息,消息响应函数去Destorywindow

热点排行