This function inserts a menu into a command bar. The menu can be specified as a resource name, using MAKEINTRESORUCE, or as a menu handle.
At a Glance
Header file: | Commctrl.h |
Windows CE versions: | 1.0 and later |
Syntax
BOOL CommandBar_InsertMenubarEx(HWND hwndCB,
HINSTANCE hInst, LPTSTR pszMenu, WORD iButton);
Parameters
hwndCB
Handle to the command bar’s window. 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
Pointer to the null-terminated string that contains the 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 indicates success. FALSE indicates failure.
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