AfxToggleMenuItemfunction
Toggles the checked state of a menu item.
Syntax
FUNCTION AfxToggleMenuItem (BYVAL hMenu AS HMENU, BYVAL uItem AS DWORD, BYVAL fByPosition AS LONG = FALSE) AS LONG
Parameters
| Name | Description | |
|---|---|---|
hMenu | Handle to the menu that contains the menu item. | |
uItem | The identifier or position of the menu item to get information about. The meaning of this parameter depends on the value of fByPosition. | |
fByPosition | The meaning of uItem. If this parameter is FALSE, uItem is a menu item identifier. Otherwise, it is a menu item position. |
Return value
The return value specifies the previous state of the menu item (either MF_CHECKED or MF_UNCHECKED). If the menu item does not exist, the return value is -1.
Description
Toggles the checked state of a menu item.
Reference
- Defined in AfxNova/AfxMenu.inc:98
- Documented in Windows/Windows GUI/Menu Procedures.md
- Topic: About Menus