This example uses the WinSetWindowBits call to change the attributes of a list box so that only one item can be be selected. This is done by turning off the multiple-select bit.

#define INCL_WINSYS
#include <OS2.H>
HWND  hwndMessageLB;
WinSetWindowBits(hwndMessageLB,
                 QWL_STYLE,        /* change style bit. */
                 0L,               /* set to 0.         */
                 LS_MULTIPLESEL);  /* multiple select bit.  */


[Back] [Next]