WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON,
BS_NOTIFY | WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON,
void prefslist(struct prefslist *hdl, struct ctlpos *cp, char *stext,               int sid, int listid, int upbid, int dnbid){    const static int percents[] = { 5, 75, 20 };    RECT r;    int xpos, percent = 0, i;    const int DEFLISTHEIGHT = 52;      /* XXX configurable? */    const int BTNSHEIGHT = 2*PUSHBTNHEIGHT + GAPBETWEEN;    int totalheight;    /* Squirrel away IDs. */    hdl->listid = listid;    hdl->upbid  = upbid;    hdl->dnbid  = dnbid;    /* The static label. */    r.left = GAPBETWEEN;    r.top = cp->ypos;    r.right = cp->width;    r.bottom = STATICHEIGHT;    cp->ypos += r.bottom + GAPWITHIN;    doctl(cp, r, "STATIC", WS_CHILD | WS_VISIBLE, 0, stext, sid);    /* XXX it'd be nice to centre the buttons wrt the listbox     * but we'd have to find out how high the latter actually is. */    if (DEFLISTHEIGHT > BTNSHEIGHT) {        totalheight = DEFLISTHEIGHT;    } else {        totalheight = BTNSHEIGHT;    }    for (i=0; i<3; i++) {        int left, wid;        xpos = (cp->width + GAPBETWEEN) * percent / 100;        left = xpos + GAPBETWEEN;        percent += percents[i];        xpos = (cp->width + GAPBETWEEN) * percent / 100;        wid = xpos - left;        switch (i) {          case 1:            /* The drag list box. */            r.left = left; r.right = wid;            r.top = cp->ypos; r.bottom = totalheight;            {                HWND ctl;                ctl = doctl(cp, r, "LISTBOX",                            WS_CHILD | WS_VISIBLE | WS_TABSTOP |			    WS_VSCROLL | LBS_HASSTRINGS,                            WS_EX_CLIENTEDGE,                            "", listid);		MakeDragList(ctl);            }            break;          case 2:            /* The "Up" and "Down" buttons. */	    /* XXX worry about accelerators if we have more than one	     * prefslist on a panel */            r.left = left; r.right = wid;            r.top = cp->ypos; r.bottom = PUSHBTNHEIGHT;            doctl(cp, r, "BUTTON",                  WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON,                  0, "&Up", upbid);            r.left = left; r.right = wid;            r.top = cp->ypos + PUSHBTNHEIGHT + GAPBETWEEN;            r.bottom = PUSHBTNHEIGHT;            doctl(cp, r, "BUTTON",                  WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON,                  0, "&Down", dnbid);            break;        }    }    cp->ypos += totalheight + GAPBETWEEN;}