Dialog procedure implementing a list box object.
A list box object. This will allow the user to scroll through a list of
items and to select one by clicking or with the arrow keys. If the D_EXIT
flag is set, double clicking on a list item will close the dialog. The
index of the selected item is held in the d1 field, and d2 is used to
store how far it has scrolled through the list. The dp field points to a
function which will be called to obtain information about the contents of
the list. This should follow the form:
char *foobar(int index, int *list_size);
If index is zero or positive, the function should return a pointer to the
string which is to be displayed at position index in the list. If index
is negative, it should return NULL and list_size should be set to the
number of items in the list.
To create a multiple selection listbox, set the dp2 field to an array of
byte flags indicating the selection state of each list item (non-zero for
selected entries). This table must be at least as big as the number of
objects in the list!
The following threads each have code containing this keyword:
Note: You can click on the numbers to jump directly to the posts that reference this page.
The following projects include source code containing this keyword: