The information in this article applies to:
SYMPTOMS
When running a 16-bit MFC application under Windows version 3.x, the
application's CWinApp::ProcessMessageFilter() is never invoked.
CAUSE
Calling the SetMessageQueue() function from within an MFC application
causes the problems listed above. Depending on the version of MFC used,
MFC sets up one or more Window hooks when the application is first loaded.
Calling SetMessageQueue() under Windows version 3.x, allocates a new
message queue for your application and deletes the old one. After these
hooks have been established, calling SetMessageQueue() destroys the hooks.
RESOLUTIONNewer versions of MFC, starting with Visual C++ version 1.5, automatically attempt to set the application's message queue to a size of 96 using a loop similar to this one:
Note that an attempt is made to set the message queue to 96. If this
attempt fails, another attempt is made with a smaller value.
If a larger message queue is needed or a failure is required in the event so that the message queue cannot be set at a desired size, you will need to provide a custom WinMain() function that duplicates the functionality of MFC's implementation of WinMain(). You can find the MFC implementation of WinMain() in \MFC\SRC\WINMAIN.CPP. Use it as a guideline for writing a custom WinMain() function for your application. STATUSThis behavior is by design. REFERENCESFor more information on SetMessageQueue() and SetWindowsHookEx(), please consult the Visual C++ Help menu. Additional query words: 1.00 1.50 2.00 2.10 4.00 4.10
Keywords : kbnokeyword kbMFC kbVC |
Last Reviewed: February 2, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |