This macro returns the index of the selected item in the List Box (for single selection only).

#define INCL_WINWINDOWMGR /* Or use INCL_WIN, INCL_PM, */
#include <os2.h>

HWND    hwndLbox;   /*  List box handle. */
LONG    lRetIndex;  /*  Index of the selected item. */

lRetIndex = WinQueryLboxSelectedItem(hwndLbox);


[Back] [Next]