hMenu = WinXNewMenu (STRING menu, firstID, isPopup)
Generates anew menu.
Parameter | Description |
---|---|
STRING menu | A string listing the menu items in the order they appear in the final menu |
firstID | The id of the first menu item |
isPopup | $$TRUE if this is a popup menu, $$FALSE if it is the main menu for a window. |
The handle to the menu (which is a standard windows menu handle), or 0 on fail
This command does not allow you to add sub menus. To add sub menus: call this function to generate each of the sub menus, then use WinXMenu_Attach function to attach the sub menus to the appropriate menu items.
The menu parameter is a list of menu items, seperated by commas. To add a seperator, use two commas with only whitespace inside them. If you prefix a character with the ampersand (&), that character will be underlined when the user presses alt. The user can then press the approprite key to jump to that menu item. To include literal ampersands, use &&.
WinXNewMenu assigns ids to the menus items sequentially. The first item gets the id firstID, the second gets firstID+1 etc. When a menu item is clicked, the onCommand callback is invoked (assuming it has been properly registered). The id parameter will be the id of the menu item.
'define ids for the menu items |