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>setmenu()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SetMenu()
Set a window's menu
------------------------------------------------------------------------------

Syntax
SetMenu( <hWnd>, <aMenu> )   -->   lSuccess

Arguments
<hWnd> is the handle to the window.

<aMenu> is the array describing the menu.  This array must
have been created originally by CreateMenu().

Returns
If successful, logical TRUE (.T.) is returned, otherwise FALSE
(.F.) is returned.

Description
This function associates the specified menu with the specified
window, allowing the user to see it (and choose items, if
there are any).

Example
// The famous File...Exit menu
aMenu = CreateMenu()
aPopupMenu = CreatePopupMenu()
AppendMenu( aPopupMenu, "exit", MF_ENABLED + MF_STRING,     ;
            "E&xit", {|cId| DoExit()} )
AppendMenu( aMenu, "file", MF_ENABLED + MF_POPUP,           ;
            "&File", aPopupMenu )
SetMenu( hWnd, aMenu )


See Also: AppendMenu() CreateMenu()

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