CFrameWnd::InsertMenu

This method inserts a menu bar into the command bar.

At a Glance

Header file: Afxwin.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 1.0 and later

Syntax

HMENU InsertMenu ( LPCTSTR lpszMenuName );
HMENU InsertMenu (
UINT wResourceID );

Parameters

lpszMenuName
Long 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 indicates success. NULL indicates failure.

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.

This method of the CFrameWnd class is unique to Windows CE.

See Also

CommandBar_InsertMenubar