This macro inserts text into a list box at index, index may be a LIT_ constant. The macro returns the actual index where it was inserted.

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

HWND    hwndLbox;   /*  List box handle. */
LONG    index;      /*  Index of the list box item. */
PSZ     psz;        /*  Text to be inserted. */
LONG    lRetIndex;  /*  Actual index where it was inserted. */

lRetIndex = WinInsertLboxItem(hwndLbox, index,
              psz);


[Back] [Next]