MenuTopRedef Function (ROM Call 0x3F)

menus.h

void MenuTopRedef (HANDLE ExecHandle, short Item, short ID);

Redefines a toolbox icon.

MenuTopRedef redefines the icon in the toolbox Item (0 = first, 1 = second, etc.), which belongs to the menu associated with the handle ExecHandle, to the icon with index Index, i.e. to the icon associated with the submenu with the given ID. The menu must have been started using MenuBegin with the MBF_REDEF flag set. This is used mainly in the Geometry application which has a toolbar menu with redefinable icons. ExecHandle is a handle returned from the MenuBegin function, not one returned from MenuNew.

Note: Such menus cannot be created using commands like MenuNew, MenuAddIcon, etc. The only way to make a such menu is to create an appropriate pre-filled static menu structure, and to pass a pointer to such a structure to MenuBegin. See MenuPopup for more info about menu structures.


Uses: CalcBitmapSize, DrawChar, DrawClipRect, DrawFkey, DrawLine, DrawMultiLines, DrawPix, DrawStr, DrawStrWidth, FontSetSys, PortRestore, RestoreScrState, SaveScrState, ScrRect, ScrRectFill, ScrToWin, SetCurAttr, SetCurClip, memset, ST_eraseHelp, CU_cursorState, CU_restore, CU_stop, ROM Call 0x41E, ROM Call 0x420


See also: MenuBegin, MenuGetTopRedef, MenuTopSelect