The information in this article applies to:
SYMPTOMSWM_HELP is not received by the parent window of a control that has been subclassed by MFC. CAUSECWnd, the base class of all MFC windows, has a handler for WM_HELP. This handler intercepts the WM_HELP message in the control itself and thus the message will not be sent to the parent window as expected. RESOLUTIONSubclass all the controls in the CDialog, CFormView, CPropertyPage, or other CWnd derived class that contains the controls which have been subclassed by MFC. The "Sample Code" below iterates through the child windows of a given parent window and checks their WindowProc. If their WindowProc is AfxWndProc (MFC's WindowProc), it subclasses the controls again so that another window procedure is called first. In this WindowProc, we check for WM_HELP and call DefWindowProc instead of passing the message to MFC's AfxWndProc. STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was corrected in Visual C++ 4.1. MORE INFORMATIONCWnd::OnHelpInfo (handler for WM_HELP) sends a WM_COMMAND with ID_HELP to the application's main frame window. This message can be intercepted in the main frame, but at this point, the HELPINFO structure has been lost. The main frame will not have any way of determining which help context should be used. REFERENCES
- Win32 SDK documentation for WM_HELP
Sample Code
Additional query words: kbVC400bug 4.00 4.10 SubclassWindow SubclassDlgItem
Keywords : kbMFC KbUIDesign kbVC kbVC410fix |
Last Reviewed: July 22, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |