This example uses the WinSetLboxItemText call to set the months in a calendar list box.

#define INCL_WINDIALOGS
#include <OS2.H>

HWND    hwndLbox;
LONG    i;
typedef char MONTH[12];
MONTH months[12] = {"January", "February", "March",
                    "April", "May", "June", "July",
                    "August", "September", "October",
                    "November", "December" };

for (i=0; i<12; i++)
{
   WinSetLboxItemText(hwndLbox,
                      i,
                      months[i]);
} /* endfor */


[Back] [Next]