c++ - 如果在父窗口调整大小时打开子窗口卡住

标签 c++ winapi

我有一些窗口。用户可以拖动它,调整大小等。在某些时候,可能会有一条消息应该显示在模态窗口中。我正在创建一个这样的窗口作为子窗口并将父窗口设置为禁用。一切正常,除了我在创建子窗口期间拖动父窗口的情况。我使用 spy 查看消息,发现在那种情况下我的子窗口没有收到 WM_ENTERSIZEMOVE 消息。似乎 parent 的 WM_ENTERSIZEMOVE 为 child 阻止了一个。我尝试为父项手动发送 WM_EXITSIZEMOVE,但不幸的是,这不起作用。

最佳答案

发送WM_CANCELMODE在显示对话框之前向您的父窗口发送消息。

Sent to cancel certain modes, such as mouse capture. For example, the system sends this message to the active window when a dialog box or message box is displayed. Certain functions also send this message explicitly to the specified window regardless of whether it is the active window. For example, the EnableWindow function sends this message when disabling the specified window

关于c++ - 如果在父窗口调整大小时打开子窗口卡住,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30886223/

相关文章:

php - 获取上传文件的真实路径

c++ - 打开/关闭其他 exe 文件的 Windows 系统调用

delphi - 使用 Delphi 检测互联网连接激活

时间:2019-03-08 标签:c++combinatorics

c++ - const_cast 与 reinterpret_cast

c++ - 将模板模板参数限制为两种类型之一

c# - 获取非 GDI 应用程序中的插入符位置

c++ - 一个简单程序的 boost::signals2 链接器错误

c++ - 如何返回指向对象的指针以便在访问对象方法的函数中使用?

winapi - DComposition创 build 备2 : E_INVALIDARG One or more arguments are invalid