Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - <b>getmenustate()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
GetMenuState()
Return the current state of a menu item
------------------------------------------------------------------------------

Syntax
GetMenuState( <aMenu>, [ <cId> | <nId> ] )   -->   nState

Arguments
<aMenu> is the existing menu, originally obtained from
CreateMenu() or CreatePopupMenu().

<cId> is an optional character string identifying the item
whose state is wanted.  Any string previously used with the
AppendMenu() function may be used.

<nId> is an optional number identifying the position of the
item whose current value is wanted.  Using this way of
specifying the position is error-prone, so it is not
recommended.

Returns
If the item does not exist, -1 is returned.  Otherwise, an
integer representing the current state of the menu item is
returned.

Description
The current state of the indicated menu item will be a
combination of the MF_* values defined in WINDOWS.CH, which
are explained in the AppendMenu() function description.

Example
aMenu = CreateMenu()
AppendMenu( aMenu, "help",                          ;
            MF_ENABLED + MF_STRING,                 ;
            "&Help", { | cId, aMenu |  Help() } )
nState = GetMenuState( aMenu, "help" )
// Result:  MF_ENABLED + MF_STRING


See Also: AppendMenu() CreateMenu() CreatePopupMenu() GetMenu() GetMenuItemCount() GetMenuString() SetMenu()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson