Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function retrieves the handle to a menu on the command bar.

Syntax

HMENU CommandBar_GetMenu(
  HWND 
hwndCB, 
  WORD 
iButton
); 

Parameters

hwndCB

Handle to the command bar's window. This handle is returned by the CommandBar_Createfunction when the command bar is created.

iButton

Zero-based index of the command bar separator button that holds the menu.

Return Value

The handle to the menu identified by the index in the iButtonparameter indicates success. NULL indicates failure.

Remarks

If the separator button identified by the iButtonparameter does not contain a menu bar, the CommandBar_GetMenufunction will fail.

Requirements

Header commctrl.h
Library commctrl.lib
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also