msgs12.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
LM_QUERYSELECTION (1.2)
Message Group  Overview                           Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINLISTBOXES
 
LM_QUERYSELECTION
mp1 = MPFROMSHORT((SHORT) iItemPrev);    /* previous item          */
mp2 = 0L;                                /* not used, must be zero */
 
An application sends an LM_QUERYSELECTION message to enumerate the selected
item or items in a list box.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
iItemPrev  Low word of mp1. Specifies the index of the previous item. A
           value of LIT_FIRST, when used with a multiple-selection list-box
           control, results in the first selected item being returned.
 
Return Value
 
The return value from a single-selection list-box control is the index of
the selected item, or LIT_NONE if no item is selected.
 
The return value from a multiple-selection list-box control is the index of
the next selected item (starting from the item specified by the iItemPrev
parameter) or LIT_NONE if there are no more selected items. The return value
is the index of the first selected item if iItemPrev is LIT_FIRST.
 
See Also
 
LM_SELECTITEM