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 structure sets members for the SHCreateMenuBarfunction.

Note:
Beginning with Windows Mobile 6.5.3, soft keys are replaced by touchable tiles on Windows Mobile Professional phones.

Syntax

typedef struct tagSHMENUBARINFO {
  DWORD 
cbSize;
  HWND 
hwndParent;
  DWORD 
dwFlags;
  UINT 
nToolBarId;
  HINSTANCE 
hInstRes;
  int 
nBmpId;
  int 
cBmpImages;
  HWND 
hwndMB;
  COLORREF 
clrBk;
} SHMENUBARINFO, *PSHMENUBARINFO;

Members

cbSize

Size of SHMENUBARINFOstructure.

hwndParent

Handle to the window to control the command bar window.

dwFlags

Specifies the properties of the menu bar. The following table shows the possible values for this member.

Flag Description

SHCMBF_COLORBK

Sets the background color value for the menu bar.

SHCMBF_DISABLEDSOFTKEYICONS

Applies to Windows Mobile 6.5.3

Enables the display of custom icons (specifically for describing the default or pressed tile state) within the touchable tiles in the menu bar. The bitmap icons are loaded from the strip bitmap that corresponds to the resource bitmap ID provided in the SHMENUBARINFO.nBmpId field.

Note   This flag is supported only for Windows Mobile Professional.

SHCMBF_EMPTYBAR

Creates an empty menu bar.

SHCMBF_HIDDEN

Creates the menu bar initially hidden.

SHCMBF_HMENU

Specifies an hmenuvalue for a resource rather than for toolbar information.

SHCMBF_HIDESIPBUTTON

Creates the menu bar with no Input Panel button.

Note   This flag is supported only for Windows Mobile.

SHCMBF_SOFTKEYICONS

Applies to Windows Mobile 6.5.3

Enables the display of custom icons (specifically for describing the disabled tile state) within the touchable tiles in the menu bar. This flag is only valid if SHCMBF_SOFTKEYICONS is also set. The bitmap icons are loaded from the strip bitmap that corresponds to the resource bitmap ID provided in the SHMENUBARINFO.nBmpId field plus one (i.e., if nBmpId is 200, then the disable resource bitmap ID used to load the bitmap would be interpreted as 201).

Note   This flag is supported only for Windows Mobile Professional.

SHCMBF_THEMEBITMAPS

Applies to Windows Mobile 6.5.3

Enables the display of theme-specific icons within the touchable tiles (buttons) in the menu bar.

Note   This flag is supported only for Windows Mobile Professional.

nToolBarId

If SHCMBF_HMENU is not set, nToolBarIdis a toolbar identifier used to load the resource from the instance specified by hInstRes.

If SHCMBF_HMENU is set, nToolBarIdis a menu identifier used to load the resource from the instance specified by hInstRes. Additionally, if this identifier is used for soft key creation and the HIWORD is zero, it directly represents an hmenualready loaded in memory.

hInstRes

Instance handle that controls the resources.

nBmpId

Bitmap identifier used to load the bitmap resource for buttons with images from the instance specified by hInstRes. This bitmap should have the same format as bitmaps used in ImageList functions. This member should be set to NULL if the creation of soft keys is intentional.

cBmpImages

Number of images in the bitmap referred to by nBmpId. This member should be set to NULL if the creation of soft keys is intentional.

hwndMB

Window handle to the menu bar.

clrBk

Defines the background color of the menu bar, excluding the software input panel (SIP).

Requirements

Header aygshell.h
Library aygshell.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Pocket PC 2000 and later, Smartphone 2002 and later