Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CheckMenuItem

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

This function sets the state of the specified menu item's check mark attribute to either checked or unchecked.


DWORD CheckMenuItem(
  HMENU hmenu, 
  UINT uIDCheckItem, 
  UINT uCheck 
); 

hmenu

[in] Handle to the menu of interest.

uIDCheckItem

[in] The menu item for which the check mark attribute is to be set, as determined by the uCheck parameter.

uCheck

[in] Constants that control the interpretation of the uIDCheckItem parameter and the state of the menu item's check mark attribute. This parameter can be a combination of MF_BYCOMMAND or MF_BYPOSITION and MF_CHECKED or MF_UNCHECKED. For more information, see Menus Constants.

The return value specifies the previous state of the menu item (either MF_CHECKED or MF_UNCHECKED). 0xFFFFFFFF indicates that the menu item does not exist.

An item in a menu bar cannot have a check mark.

The uIDCheckItem parameter identifies an item that opens a submenu or a command item. For an item that opens a submenu, the uIDCheckItem parameter must specify the position of the item. For a command item, the uIDCheckItem parameter can specify either the item's position or its identifier.

Headerwinuser.h
LibraryMenu.lib
Windows Embedded CEWindows CE 1.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

Show:
© 2015 Microsoft