FIX: F1 Help Routed Wrongly for Additional Top-Level Windows (167961)
The information in this article applies to:
- The Microsoft Foundation Classes (MFC), when used with:
- 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
- Microsoft Visual C++, 32-bit Editions 2.2
This article was previously published under Q167961 SYMPTOMS
When you press the F1 key to display help for a window that is not a
descendant of the application's main window, it does not display the proper
help text.
CAUSE
MFC assumes that the currently active window is a descendant of the main
window. So, for windows that are children of the desktop, MFC routes
WM_COMMANDHELP to the mainframe instead of the active window.
RESOLUTION
Add an ID_HELP command handler in the CMainFrame that searches for the
active window based on the window with the current focus and walks up the
parent tree sending the WM_COMMANDHELP message. Use the code shown in the
sample code section.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This problem has been fixed in Visual C++
version 4.0.
Modification Type: | Major | Last Reviewed: | 12/2/2003 |
---|
Keywords: | kbBug kbDocView kbfix kbNoUpdate kbVC400fix KB167961 |
---|
|