线程安全和 AfxMessageBox
AfxMessageBox函数线程安全吗?
我看到 AfxMessageBox 调用 AfxGetMainWnd()->GetSafeHwnd() 和 CCmdTarget::GetRoundingFrame_()->GetSafeHwnd() 等背后的 MFC 代码,我想知道它的线程安全性。
如果我有多个 GUI 线程,是否可以从其中任何一个线程调用 AfxMessageBox?
Is the AfxMessageBox function thread safe?
I see the MFC code behind AfxMessageBox invoking such as AfxGetMainWnd()->GetSafeHwnd() and CCmdTarget::GetRoundingFrame_()->GetSafeHwnd(), and I'm wondering about its thread safety.
If I have multiple GUI threads, is it OK to invoke AfxMessageBox from either of them?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,它是线程安全的。来自 MSDN:
Yes it is thread-safe. From MSDN: