WinXMenu_Attach


WinXMenu_Attach (subMenu, newParent, id)

Attaches a menu to an item in another menu, hence turning the menu into a sub menu.

Parameter Description
subMenu The menu to attach
newParent The menu to attach the sub menu to
id The id of the menu item to attach the sub menu to

Returns

$$TRUE on success or $$FALSE on fail

Remarks

none

Examples

'define ids for the main menu bar
$$ID_FILE =100
$$ID_EDIT = 101
$$ID_VIEW = 102
$$ID_HELP =103

'define constants for the file sub menu
$$ID_FILE_NEW = 200
$$ID_FILE_OPEN = 201
$$ID_FILE_SAVE = 202
$$ID_FILE_SAVEAS = 203
$$ID_FILE_EXIT = 204

'make the main menu
hMenu = WinXNewMenu ("&File, &Edit, &View, &Help", $$ID_FILE)

'make the file sub menu
hSub = WinXNewMenu ("&New, &Open, &Save, Save &As, , &Exit", $$ID_FILE_NEW)

'attach the file sub menu to the main menu bar
WinXMenu_Attach (hSub, hMenu, $$ID_FILE)

Related Links

WinXNewMenu