INFO: SetMessageQueue Used in MFC WinMain (118611)
The information in this article applies to:
- The Microsoft Foundation Classes (MFC), when used with:
- Microsoft Visual C++ for Windows, 16-bit edition 1.5
- Microsoft Visual C++ for Windows, 16-bit edition 1.51
- Microsoft Visual C++ for Windows, 16-bit edition 1.52
- Microsoft Visual C++, 32-bit Editions 2.0
- Microsoft Visual C++, 32-bit Editions 2.1
This article was previously published under Q118611 SUMMARY
Functions that use the applications message queue do not work correctly if
they are called in the constructor of a global or static object.
SetMessageQueue is called in the initialization code at the beginning of
the MFC WinMain() function. SetMessageQueue replaces the current message
queue with a new message queue. The constructors of global or static C++
objects are called before WinMain(). If these constructors call functions
that rely on the message queue, the objects do not work properly.
Modification Type: | Major | Last Reviewed: | 12/2/2003 |
---|
Keywords: | kbArchitecture kbinfo KB118611 |
---|
|