With wdlg_set_iconify() one can iconify a window dialog. The GRECT <g> sets the new position and size of the window (external dimensions). Generally one will pass msg+4 here when one has received the message WM_ICONIFIY. But equally one can also pass a GRECT {-1,-1,-1,-1} which MagiC uses to ascertain the position.
ICONIFY alters the position and size of the root object. As one usually wants to display a different object tree for iconified windows, this can be passed in <tree> (otherwise set it to NULL).
Usually such an object tree consists only of the root object (G_BOX) and an icon (G_(C)ICON). If the icon (or another object) is to be centred in the window, the object number is passed in <obj>, otherwise -1. Furthermore one can specify a new window title. However the calling routine must ensure that the original title is restored at the wdlg_set_uniconify call.
Declaration:
WORD wdlg_set_iconify( DIALOG *dialog, GRECT *g,
char *title, OBJECT *tree, WORD obj );
Call:
wdlg_set_iconify( dialog, g, title, tree, obj );
Variable Argument Meaning
Inputs:
contrl[0] 165 wdlg_set
contrl[1] 2 Entries in intin
contrl[2] 1 Entries in intout
contrl[3] 4 Entries in addrin
intin[0] 3 wdlg_set_iconify
intin[1] obj Object to be centred or -1
addrin[0] dialog Pointer to the dialog structure
addrin[1] g Pointer to GRECT
addrin[2] title New window title or NULL
addrin[3] tree New window tree or NULL
Outputs:
intout[0] 1
Note: This function is only present from WDIALOG 1.05 onwards. If it is not present, intout[0] contains a 0.