DO reacts to the activation of a button. This function should be called after form_do() (or by the service function of the window dialog). If one of the entries of the list box was selected with a double-click, lbox_do() returns -1. The dialog should then be closed as if the OK button had been activated.
lbox_do() recognises double-clicks by the set topmost bit of the object number <obj> (object number | 0x8000). For the returned object number <slct_obj> the top bit is always cleared.
Declaration:
WORD lbox_do( LIST_BOX *box, WORD obj );
Call:
slct_obj = lbox_do( box, obj );
Variable Argument Meaning
Inputs:
contrl[0] 172 lbox_do
contrl[1] 1 Entries in intin
contrl[3] 1 Entries in addrin
intin[0] obj Number of the selected object
addrin[0] box Pointer to the list box structure
Outputs:
contrl[2] 1 Entries in intout
contrl[4] 0 Entries in addrout
intout[0] slct_obj Number of the selected object
or -1, if there was a double-click
on an entry