This macro returns the number of items in the List Box.
#define INCL_WINWINDOWMGR /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HWND hwndLbox; /* Listbox handle. */ LONG lRetNumIt; /* Number of items in the list box. */ lRetNumIt = WinQueryLboxCount(hwndLbox);