CFrameWnd::InsertMenu

Call this member function to inserts a menu bar into the command bar.

Syntax

HMENU InsertMenu ( LPCTSTR lpszMenuName );

HMENU InsertMenu ( UINT wResourceID );

At a Glance

Header File Afxwin.h
Platforms
Versions 1.0 and later

Parameters

lpszMenuName
A pointer to the null-terminated string that contains the name of the menu bar to be inserted.
wResourceID
Resource identifier of the menu bar to be inserted in the command bar.

Return Value

The window handle to the menu bar. If this function fails, it returns a value of NULL.

Remarks

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.

Note This member function of the CFrameWnd class is unique to Windows CE.

See Also

CFrameWnd Overview, CFrameWnd Member Functions, Frame Windows and Splitter Windows, CommandBar_InsertMenubar