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>getmenublock()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
GetMenuBlock()
Return a menu item's code block
------------------------------------------------------------------------------

Syntax
GetMenuBlock( <aMenu>, [ <cId> | <nId> ] )   -->   bAction

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

<cId> is an optional character string identifying the item
whose prompt (label) 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 prompt is wanted.  Using this way of
specifying the position is error-prone, so it is not
recommended.

Returns
If the item does not exist, NIL is returned.  Otherwise, the
code block of the menu item is returned.

Description
This function can be used to retrieve the code block you
specified for a particular menu item in the AppendMenu()
function call.  (This function is supplied mainly for
completeness; you are unlikely to need it.)

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


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

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