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?
Yes it is thread-safe. From MSDN: