SetMessageQueue Used in MFC WinMainLast reviewed: October 10, 1997Article ID: Q118611 |
1.50 1.51 1.52 | 2.00 2.10
WINDOWS | WINDOWS NTkbprg The information in this article applies to:
SUMMARYFunctions 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.
MORE INFORMATIONMFC for Windows, version 2.5, calls SetMessageQueue in the AfxWinInit() function, which is called by the MFC WinMain() function. The constructors for global and static objects are called before WinMain(). These constructors should not call functions that use the applications message queue or rely on the message queue remaining the same after the constructor is executed. These functions include:
|
Additional reference words: kbinf 1.50 2.00 2.10 2.50 2.51 2.52 3.00 3.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |