|
Support
ActiveX / COM
Visual C++ / MFC
Customer Spotlight
Corporate Partners
Contact Sales
Call center available M-F 9:00 - 6:00 US Eastern Time. U.S. and Canada International Email |
Add MDI Menus customization
Author: Kirk Stowell
Posted: November 16, 2004
Environment: Visual C++ MFC
Xtreme CommandBars has three ways for developers to add MDI Menu customization menus. This tutorial assumes that you have already created an application with customization. Click here for more information about this. 1. Standard MDI Menu customizationThis method uses the MFC architecture for MDI menus, you just need to add standard customization without additional changes. As in a standard MFC application, you must add templates for each MDI document type Advantages:
Disadvantages:
Notes:
CXTPCommandBar* pMenuBar = pCommandBars->SetMenu( _T("Menu Bar"), IDR_MAINFRAME);
2. Static MDI Menu customization All you need is to add the xtpFlagIgnoreSetMenuMessage flag to the Menu Bar: CXTPCommandBar* pMenuBar = pCommandBars->SetMenu( _T("Menu Bar"), IDR_CUSTOMTYPE); pMenuBar->SetFlags(xtpFlagIgnoreSetMenuMessage); and all other menu templates will be ignored. Advantages:
Disadvantages
Notes:
3. Custom MDI menu customization This is the most difficult for developers, but the most friendly type for user customization. Developers must create only one Menu template with all popup items needed to be used in the application, and assign programmatically what popup items are shown in each template. For example developers must add the ‘Window’ item but assign it to show only when some documents are visible. For this customization type add ExcludeDocTemplate and AssignDocTemplate methods of CXTPControl class. Advantages:
Disadvantages
Notes:
See Also |
