| DialogAdd | Function (ROM Call 0x33)

dialogs.h

HANDLE DialogAdd (HANDLE Handle, short unknown, short x, short y, short ItemType, ...);

Adds an item into a dialog box.

DialogAdd is an universal item-adding function. It is a very complicated function which accepts from 7 to 12 parameters depending of the type of the item which will be added (the type is determined by parameter ItemType). In fact, functions like DialogAddText, DialogAddTitle, DialogAddRequest and DialogAddPulldown are implemented as macros which calls DialogAdd function with appropriate parameters (for easier usage), so you can mainly avoid this function (you can read dialogs.h file to see how exactly these macros are implemented). However, this function has so many parameters that I didn't discover all the variants, so existence of this function would allow possibilities not covered with functions like DialogAddText. At the moment, I still don't know how to create a dialog with function keys (like "MODE" and "VAR-LINK" dialogs), nor a dialog with scrolling items (like "UNITS" dialogs). DialogAdd returns H_NULL if ItemType is wrong.
This function is open for anybody which knows more about dialogs than I know. What I also know is that legal ItemType values are: 2, 3, 7, 8, 10, 12 and 14. 2 is for adding request boxes, 7 for adding texts, 8 for adding titles, and 14 for adding pulldown menus. 10 and 12 are also related with request boxes and pulldown menus, but required extra parameters are somewhat different. It seems that 11 was planed for adding function keys, but not implemented, so it is very questionable whether function key menus can be added to dialogs using DialogAdd. DialogAdd with ItemType equal to 3 is the general dialog setup command, but it needs 12 parameters and I still haven't had any success in discovering them exactly. This command (with ItemType set to 3) is the key for creating dialogs with scrolling items. Any info is welcomed.

Uses: HeapRealloc, HeapSize, memcpy, memmove, memset, strlen
Used by: DialogAddPulldown, DialogAddRequest, DialogAddText, DialogAddTitle, DlgMessage, VarNew, VarOpen, VarSaveAs, cmd_dialog, cmd_request, EV_defaultHandler, HomeExecute, VarSaveTitle