This method inserts a menu bar into the command bar.
Header file: | Afxwin.h |
Platforms: | H/PC 2.0, Palm-size PC, H/PC Pro |
Windows CE versions: | 1.0 and later |
HMENU InsertMenu ( LPCTSTR lpszMenuName );
HMENU InsertMenu ( UINT wResourceID );
The window handle to the menu bar indicates success. NULL indicates failure.
CFrameWnd::InsertMenu inserts a menu bar, of the same type you use for the main menu in a Windows 95 or Windows NT application, into a command bar. It inserts the menu bar to the right of any existing elements. If you want to insert a menu bar at a particular index in the command bar, use the global function, CommandBar_InsertMenubar. Pass the CFrameWnd::m_hCommandBar data member as the hwndCB parameter to this function.
This method of the CFrameWnd class is unique to Windows CE.