CommandBar_InsertMenubarEx

The CommandBar_InsertMenubarEx function inserts a menu into a command bar. The menu can be specified as a resource name, using MAKEINTRESORUCE, or as a menu handle.

Syntax

BOOL CommandBar_InsertMenubar(HWND hwndCB, HINSTANCE hInst, LPTSTR pszMenu, int iButton);

At a Glance

Header file: Commctrl.h
Platforms: H/PC
Windows CE versions: 1.0 and later

Parameters

hwndCB
The command bar's window handle. This handle is returned by the CommandBar_Create function when the command bar is created.
hInst
Handle to the application instance. This parameter must be NULL if pszMenu contains a menu handle. If pszMenu contains a resource name, hinst must contain the instance handle.
pszMenu
Name of a menu resource or menu handle.
iButton
Zero-based index of a button. CommandBar_InsertMenubarEx inserts the menu bar to the left of this button.

Return Values

TRUE if the function succeeds. FALSE if it fails.

Remarks

Use the same type of menu bar in the command bar of a Windows CE application that you use for the main menu in an application running on a Windows desktop platform.

See Also

CommandBar_Create, CommandBar_GetMenu , CommandBar_InsertButton, CommandBar_InsertComboBox, CommandBar_InsertMenuBar