How to Use Multiple Menus in MFC App That Uses GetDefaultMenu (145857)
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
- Microsoft Visual C++, 32-bit Editions 2.2
- Microsoft Visual C++, 32-bit Editions 4.0
This article was previously published under Q145857 SUMMARY
In an MFC application, you may occasionally find it useful to switch
between menus within the same frame window, such as when using static
splitter windows or objects in a view requiring a whole new menu. Because
the framework provides automatic support for only one menu per document
template (hence per frame), additional code must be added to switch
automatically between multiple menu resources. MFC provides the
undocumented virtual function CDocument::GetDefaultMenu() to allow the
document to determine which menu to display.
REFERENCES
MFC Source Code.
Modification Type: | Major | Last Reviewed: | 12/2/2003 |
---|
Keywords: | kbcode KB145857 kbAudDeveloper |
---|
|