c++ - DialogBox 消息是否发送到自定义消息循环?

标签 c++ winapi

我有一个当前有消息循环的应用程序。如果我要使用 DialogBox 方法创建一个模式对话框,当前消息循环是否也会从对话框接收消息,或者它们是否会被运行时保留?

最佳答案

DialogBox创建自己的消息循环,这样你的消息循环就不会运行。来自文档:

The function displays the dialog box (regardless of whether the template specifies the WS_VISIBLE style), disables the owner window, and starts its own message loop to retrieve and dispatch messages for the dialog box.

关于c++ - DialogBox 消息是否发送到自定义消息循环?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10926435/

相关文章:

winapi - 我可能会泄露哪些未命名的 GDI 资源

检查是否使用 C 安装了服务

winapi - 如何从隐藏窗口应用程序中显示对话框?

c++ - 如何正确转发可调用类型

仅当字符数组获取 "1000!"的输入时,C++ 程序在删除时崩溃

c++ - 虚继承应该写 "public virtual"还是 "virtual public"?

c++ - WINAPI 代码中的链接器错误

c++ - boost::variant 的树状容器——有什么缺点吗?

c++ - 如何使用函数指针作为模板类的构造函数参数?

c++ - 如何检测windows 8.1开始菜单?