CommandBar_InsertMenubarEx (Compact 2013)

3/28/2014

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.

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 Value

TRUE indicates success. FALSE indicates failure.

Remarks

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

Requirements

Header

commctrl.h

Library

commctrl.lib

See Also

Reference

Command Bars Functions
CommandBar_Create
CommandBar_GetMenu
CommandBar_InsertButton
CommandBar_InsertComboBox
CommandBar_InsertMenubar