3a59503412ed673ff1ea3130784e9ef043857a3c
2 * winctrls.c: routines to self-manage the controls in a dialog
15 #define STATICHEIGHT 8
16 #define CHECKBOXHEIGHT 8
19 #define COMBOHEIGHT 12
20 #define PUSHBTNHEIGHT 14
22 void ctlposinit(struct ctlpos
*cp
, HWND hwnd
,
23 int leftborder
, int rightborder
, int topborder
) {
26 cp
->font
= SendMessage(hwnd
, WM_GETFONT
, 0, 0);
28 GetClientRect(hwnd
, &r
);
32 MapDialogRect(hwnd
, &r2
);
33 cp
->dlu4inpix
= r2
.right
;
34 cp
->width
= (r
.right
* 4) / (r2
.right
) - 2*GAPBETWEEN
;
35 cp
->xoff
= leftborder
;
36 cp
->width
-= leftborder
+ rightborder
;
39 void doctl(struct ctlpos
*cp
, RECT r
,
40 char *wclass
, int wstyle
, int exstyle
,
41 char *wtext
, int wid
) {
44 * Note nonstandard use of RECT. This is deliberate: by
45 * transforming the width and height directly we arrange to
46 * have all supposedly same-sized controls really same-sized.
50 MapDialogRect(cp
->hwnd
, &r
);
52 ctl
= CreateWindowEx(exstyle
, wclass
, wtext
, wstyle
,
53 r
.left
, r
.top
, r
.right
, r
.bottom
,
54 cp
->hwnd
, (HMENU
)wid
, hinst
, NULL
);
55 SendMessage(ctl
, WM_SETFONT
, cp
->font
, MAKELPARAM(TRUE
, 0));
59 * A title bar across the top of a sub-dialog.
61 void bartitle(struct ctlpos
*cp
, char *name
, int id
) {
64 r
.left
= GAPBETWEEN
; r
.right
= cp
->width
;
65 r
.top
= cp
->ypos
; r
.bottom
= STATICHEIGHT
;
66 cp
->ypos
+= r
.bottom
+ GAPBETWEEN
;
67 doctl(cp
, r
, "STATIC", WS_CHILD
| WS_VISIBLE
, 0, name
, id
);
71 * Begin a grouping box, with or without a group title.
73 void beginbox(struct ctlpos
*cp
, char *name
, int idbox
, int idtext
) {
75 cp
->ypos
+= STATICHEIGHT
/2;
76 cp
->boxystart
= cp
->ypos
;
78 cp
->ypos
+= STATICHEIGHT
- (STATICHEIGHT
/2);
80 cp
->width
-= 2*GAPXBOX
;
83 cp
->boxtextid
= idtext
;
90 void endbox(struct ctlpos
*cp
) {
93 cp
->width
+= 2*GAPXBOX
;
94 cp
->ypos
+= GAPYBOX
- GAPBETWEEN
;
95 r
.left
= GAPBETWEEN
; r
.right
= cp
->width
;
96 r
.top
= cp
->boxystart
; r
.bottom
= cp
->ypos
- cp
->boxystart
;
97 doctl(cp
, r
, "STATIC", WS_CHILD
| WS_VISIBLE
| SS_ETCHEDFRAME
, 0,
102 HFONT oldfont
, dlgfont
;
103 hdc
= GetDC(cp
->hwnd
);
104 dlgfont
= (HFONT
)cp
->font
;
105 oldfont
= SelectObject(hdc
, dlgfont
);
106 GetTextExtentPoint32(hdc
, cp
->boxtext
, strlen(cp
->boxtext
), &s
);
107 SelectObject(hdc
, oldfont
);
109 r
.left
= GAPXBOX
+ GAPBETWEEN
;
110 r
.right
= (s
.cx
* 4 + cp
->dlu4inpix
-1) / cp
->dlu4inpix
;
112 r
.top
= cp
->boxystart
- STATICHEIGHT
/2; r
.bottom
= STATICHEIGHT
;
113 doctl(cp
, r
, "STATIC", WS_CHILD
| WS_VISIBLE
, 0,
114 cp
->boxtext
, cp
->boxtextid
);
120 * Some edit boxes. Each one has a static above it. The percentages
121 * of the horizontal space are provided.
123 void multiedit(struct ctlpos
*cp
, ...) {
132 int staticid
, editid
, pcwidth
;
133 text
= va_arg(ap
, char *);
136 staticid
= va_arg(ap
, int);
137 editid
= va_arg(ap
, int);
138 pcwidth
= va_arg(ap
, int);
140 r
.left
= xpos
+ GAPBETWEEN
;
142 xpos
= (cp
->width
+ GAPBETWEEN
) * percent
/ 100;
143 r
.right
= xpos
- r
.left
;
145 r
.top
= cp
->ypos
; r
.bottom
= STATICHEIGHT
;
146 doctl(cp
, r
, "STATIC", WS_CHILD
| WS_VISIBLE
, 0,
148 r
.top
= cp
->ypos
+ 8 + GAPWITHIN
; r
.bottom
= EDITHEIGHT
;
150 WS_CHILD
| WS_VISIBLE
| WS_TABSTOP
| ES_AUTOHSCROLL
,
155 cp
->ypos
+= 8+GAPWITHIN
+12+GAPBETWEEN
;
159 * A set of radio buttons on the same line, with a static above
160 * them. `nacross' dictates how many parts the line is divided into
161 * (you might want this not to equal the number of buttons if you
162 * needed to line up some 2s and some 3s to look good in the same
165 void radioline(struct ctlpos
*cp
,
166 char *text
, int id
, int nacross
, ...) {
172 r
.left
= GAPBETWEEN
; r
.top
= cp
->ypos
;
173 r
.right
= cp
->width
; r
.bottom
= STATICHEIGHT
;
174 cp
->ypos
+= r
.bottom
+ GAPWITHIN
;
175 doctl(cp
, r
, "STATIC", WS_CHILD
| WS_VISIBLE
, 0, text
, id
);
176 va_start(ap
, nacross
);
182 btext
= va_arg(ap
, char *);
185 bid
= va_arg(ap
, int);
186 r
.left
= GAPBETWEEN
+ i
* (cp
->width
+GAPBETWEEN
)/nacross
;
187 r
.right
= (i
+1) * (cp
->width
+GAPBETWEEN
)/nacross
- r
.left
;
188 r
.top
= cp
->ypos
; r
.bottom
= RADIOHEIGHT
;
189 doctl(cp
, r
, "BUTTON",
190 BS_AUTORADIOBUTTON
| WS_CHILD
| WS_VISIBLE
| WS_TABSTOP
| group
,
197 cp
->ypos
+= r
.bottom
+ GAPBETWEEN
;
201 * A set of radio buttons on multiple lines, with a static above
204 void radiobig(struct ctlpos
*cp
, char *text
, int id
, ...) {
209 r
.left
= GAPBETWEEN
; r
.top
= cp
->ypos
;
210 r
.right
= cp
->width
; r
.bottom
= STATICHEIGHT
;
211 cp
->ypos
+= r
.bottom
+ GAPWITHIN
;
212 doctl(cp
, r
, "STATIC", WS_CHILD
| WS_VISIBLE
, 0, text
, id
);
218 btext
= va_arg(ap
, char *);
221 bid
= va_arg(ap
, int);
222 r
.left
= GAPBETWEEN
; r
.top
= cp
->ypos
;
223 r
.right
= cp
->width
; r
.bottom
= STATICHEIGHT
;
224 cp
->ypos
+= r
.bottom
+ GAPWITHIN
;
225 doctl(cp
, r
, "BUTTON",
226 BS_AUTORADIOBUTTON
| WS_CHILD
| WS_VISIBLE
| WS_TABSTOP
| group
,
232 cp
->ypos
+= GAPBETWEEN
- GAPWITHIN
;
236 * A single standalone checkbox.
238 void checkbox(struct ctlpos
*cp
, char *text
, int id
) {
241 r
.left
= GAPBETWEEN
; r
.top
= cp
->ypos
;
242 r
.right
= cp
->width
; r
.bottom
= CHECKBOXHEIGHT
;
243 cp
->ypos
+= r
.bottom
+ GAPBETWEEN
;
244 doctl(cp
, r
, "BUTTON",
245 BS_AUTOCHECKBOX
| WS_CHILD
| WS_VISIBLE
| WS_TABSTOP
, 0,
250 * A button on the right hand side, with a static to its left.
252 void staticbtn(struct ctlpos
*cp
, char *stext
, int sid
,
253 char *btext
, int bid
) {
254 const int height
= (PUSHBTNHEIGHT
> STATICHEIGHT ?
255 PUSHBTNHEIGHT
: STATICHEIGHT
);
257 int lwid
, rwid
, rpos
;
259 rpos
= GAPBETWEEN
+ 3 * (cp
->width
+ GAPBETWEEN
) / 4;
260 lwid
= rpos
- 2*GAPBETWEEN
;
261 rwid
= cp
->width
+ GAPBETWEEN
- rpos
;
263 r
.left
= GAPBETWEEN
; r
.top
= cp
->ypos
+ (height
-STATICHEIGHT
)/2;
264 r
.right
= lwid
; r
.bottom
= STATICHEIGHT
;
265 doctl(cp
, r
, "STATIC", WS_CHILD
| WS_VISIBLE
, 0, stext
, sid
);
267 r
.left
= rpos
; r
.top
= cp
->ypos
+ (height
-PUSHBTNHEIGHT
)/2;
268 r
.right
= rwid
; r
.bottom
= PUSHBTNHEIGHT
;
269 doctl(cp
, r
, "BUTTON",
270 WS_CHILD
| WS_VISIBLE
| WS_TABSTOP
| BS_PUSHBUTTON
,
274 cp
->ypos
+= height
+ GAPBETWEEN
;
278 * An edit control on the right hand side, with a static to its left.
280 void staticedit(struct ctlpos
*cp
, char *stext
,
281 int sid
, int eid
, int percentedit
) {
282 const int height
= (EDITHEIGHT
> STATICHEIGHT ?
283 EDITHEIGHT
: STATICHEIGHT
);
285 int lwid
, rwid
, rpos
;
287 rpos
= GAPBETWEEN
+ (100-percentedit
) * (cp
->width
+ GAPBETWEEN
) / 100;
288 lwid
= rpos
- 2*GAPBETWEEN
;
289 rwid
= cp
->width
+ GAPBETWEEN
- rpos
;
291 r
.left
= GAPBETWEEN
; r
.top
= cp
->ypos
+ (height
-STATICHEIGHT
)/2;
292 r
.right
= lwid
; r
.bottom
= STATICHEIGHT
;
293 doctl(cp
, r
, "STATIC", WS_CHILD
| WS_VISIBLE
, 0, stext
, sid
);
295 r
.left
= rpos
; r
.top
= cp
->ypos
+ (height
-EDITHEIGHT
)/2;
296 r
.right
= rwid
; r
.bottom
= EDITHEIGHT
;
298 WS_CHILD
| WS_VISIBLE
| WS_TABSTOP
| ES_AUTOHSCROLL
,
302 cp
->ypos
+= height
+ GAPBETWEEN
;
306 * A tab-control substitute when a real tab control is unavailable.
308 void ersatztab(struct ctlpos
*cp
, char *stext
, int sid
,
310 const int height
= (COMBOHEIGHT
> STATICHEIGHT ?
311 COMBOHEIGHT
: STATICHEIGHT
);
313 int bigwid
, lwid
, rwid
, rpos
;
314 static const int BIGGAP
= 15;
315 static const int MEDGAP
= 3;
317 bigwid
= cp
->width
+ 2*GAPBETWEEN
- 2*BIGGAP
;
319 rpos
= BIGGAP
+ (bigwid
+ BIGGAP
) / 2;
320 lwid
= rpos
- 2*BIGGAP
;
321 rwid
= bigwid
+ BIGGAP
- rpos
;
323 r
.left
= BIGGAP
; r
.top
= cp
->ypos
+ (height
-STATICHEIGHT
)/2;
324 r
.right
= lwid
; r
.bottom
= STATICHEIGHT
;
325 doctl(cp
, r
, "STATIC", WS_CHILD
| WS_VISIBLE
, 0, stext
, sid
);
327 r
.left
= rpos
; r
.top
= cp
->ypos
+ (height
-COMBOHEIGHT
)/2;
328 r
.right
= rwid
; r
.bottom
= COMBOHEIGHT
*10;
329 doctl(cp
, r
, "COMBOBOX",
330 WS_CHILD
| WS_VISIBLE
| WS_TABSTOP
|
331 CBS_DROPDOWNLIST
| CBS_HASSTRINGS
,
335 cp
->ypos
+= height
+ MEDGAP
+ GAPBETWEEN
;
337 r
.left
= GAPBETWEEN
; r
.top
= cp
->ypos
;
338 r
.right
= cp
->width
; r
.bottom
= 2;
339 doctl(cp
, r
, "STATIC", WS_CHILD
| WS_VISIBLE
| SS_ETCHEDHORZ
,
344 * A static line, followed by an edit control on the left hand side
345 * and a button on the right.
347 void editbutton(struct ctlpos
*cp
, char *stext
, int sid
,
348 int eid
, char *btext
, int bid
) {
349 const int height
= (EDITHEIGHT
> PUSHBTNHEIGHT ?
350 EDITHEIGHT
: PUSHBTNHEIGHT
);
352 int lwid
, rwid
, rpos
;
354 r
.left
= GAPBETWEEN
; r
.top
= cp
->ypos
;
355 r
.right
= cp
->width
; r
.bottom
= STATICHEIGHT
;
356 cp
->ypos
+= r
.bottom
+ GAPWITHIN
;
357 doctl(cp
, r
, "STATIC", WS_CHILD
| WS_VISIBLE
, 0, stext
, sid
);
359 rpos
= GAPBETWEEN
+ 3 * (cp
->width
+ GAPBETWEEN
) / 4;
360 lwid
= rpos
- 2*GAPBETWEEN
;
361 rwid
= cp
->width
+ GAPBETWEEN
- rpos
;
363 r
.left
= GAPBETWEEN
; r
.top
= cp
->ypos
+ (height
-EDITHEIGHT
)/2;
364 r
.right
= lwid
; r
.bottom
= EDITHEIGHT
;
366 WS_CHILD
| WS_VISIBLE
| WS_TABSTOP
| ES_AUTOHSCROLL
,
370 r
.left
= rpos
; r
.top
= cp
->ypos
+ (height
-PUSHBTNHEIGHT
)/2;
371 r
.right
= rwid
; r
.bottom
= PUSHBTNHEIGHT
;
372 doctl(cp
, r
, "BUTTON",
373 WS_CHILD
| WS_VISIBLE
| WS_TABSTOP
| BS_PUSHBUTTON
,
377 cp
->ypos
+= height
+ GAPBETWEEN
;
381 * Special control which was hard to describe generically: the
382 * session-saver assembly. A static; below that an edit box; below
383 * that a list box. To the right of the list box, a column of
386 void sesssaver(struct ctlpos
*cp
, char *text
,
387 int staticid
, int editid
, int listid
, ...) {
390 int lwid
, rwid
, rpos
;
392 const int LISTDEFHEIGHT
= 66;
394 rpos
= GAPBETWEEN
+ 3 * (cp
->width
+ GAPBETWEEN
) / 4;
395 lwid
= rpos
- 2*GAPBETWEEN
;
396 rwid
= cp
->width
+ GAPBETWEEN
- rpos
;
398 /* The static control. */
399 r
.left
= GAPBETWEEN
; r
.top
= cp
->ypos
;
400 r
.right
= lwid
; r
.bottom
= STATICHEIGHT
;
401 cp
->ypos
+= r
.bottom
+ GAPWITHIN
;
402 doctl(cp
, r
, "STATIC", WS_CHILD
| WS_VISIBLE
, 0, text
, staticid
);
404 /* The edit control. */
405 r
.left
= GAPBETWEEN
; r
.top
= cp
->ypos
;
406 r
.right
= lwid
; r
.bottom
= EDITHEIGHT
;
407 cp
->ypos
+= r
.bottom
+ GAPWITHIN
;
409 WS_CHILD
| WS_VISIBLE
| WS_TABSTOP
| ES_AUTOHSCROLL
,
414 * The buttons (we should hold off on the list box until we
415 * know how big the buttons are).
417 va_start(ap
, listid
);
420 char *btext
= va_arg(ap
, char *);
423 bid
= va_arg(ap
, int);
424 r
.left
= rpos
; r
.top
= y
;
425 r
.right
= rwid
; r
.bottom
= PUSHBTNHEIGHT
;
426 y
+= r
.bottom
+ GAPWITHIN
;
427 doctl(cp
, r
, "BUTTON",
428 WS_CHILD
| WS_VISIBLE
| WS_TABSTOP
| BS_PUSHBUTTON
,
433 /* Compute list box height. LISTDEFHEIGHT, or height of buttons. */
436 if (y
< LISTDEFHEIGHT
) y
= LISTDEFHEIGHT
;
437 r
.left
= GAPBETWEEN
; r
.top
= cp
->ypos
;
438 r
.right
= lwid
; r
.bottom
= y
;
439 cp
->ypos
+= y
+ GAPBETWEEN
;
440 doctl(cp
, r
, "LISTBOX",
441 WS_CHILD
| WS_VISIBLE
| WS_TABSTOP
| WS_VSCROLL
|
442 LBS_NOTIFY
| LBS_HASSTRINGS
,
448 * Another special control: the environment-variable setter. A
449 * static line first; then a pair of edit boxes with associated
450 * statics, and two buttons; then a list box.
452 void envsetter(struct ctlpos
*cp
, char *stext
, int sid
,
453 char *e1stext
, int e1sid
, int e1id
,
454 char *e2stext
, int e2sid
, int e2id
,
456 char *b1text
, int b1id
, char *b2text
, int b2id
) {
458 const int height
= (STATICHEIGHT
> EDITHEIGHT
&& STATICHEIGHT
> PUSHBTNHEIGHT ?
460 EDITHEIGHT
> PUSHBTNHEIGHT ?
461 EDITHEIGHT
: PUSHBTNHEIGHT
);
462 const static int percents
[] = { 20, 35, 10, 25 };
463 int i
, j
, xpos
, percent
;
464 const int LISTHEIGHT
= 42;
466 /* The static control. */
467 r
.left
= GAPBETWEEN
; r
.top
= cp
->ypos
;
468 r
.right
= cp
->width
; r
.bottom
= STATICHEIGHT
;
469 cp
->ypos
+= r
.bottom
+ GAPWITHIN
;
470 doctl(cp
, r
, "STATIC", WS_CHILD
| WS_VISIBLE
, 0, stext
, sid
);
472 /* The statics+edits+buttons. */
473 for (j
= 0; j
< 2; j
++) {
475 for (i
= 0; i
< 4; i
++) {
476 xpos
= (cp
->width
+ GAPBETWEEN
) * percent
/ 100;
477 r
.left
= xpos
+ GAPBETWEEN
;
478 percent
+= percents
[i
];
479 xpos
= (cp
->width
+ GAPBETWEEN
) * percent
/ 100;
480 r
.right
= xpos
- r
.left
;
482 r
.bottom
= (i
==0 ? STATICHEIGHT
:
485 r
.top
+= (height
-r
.bottom
)/2;
487 doctl(cp
, r
, "STATIC", WS_CHILD
| WS_VISIBLE
, 0,
488 j
==0 ? e1stext
: e2stext
, j
==0 ? e1sid
: e2sid
);
491 WS_CHILD
| WS_VISIBLE
| WS_TABSTOP
| ES_AUTOHSCROLL
,
493 "", j
==0 ? e1id
: e2id
);
495 doctl(cp
, r
, "BUTTON",
496 WS_CHILD
| WS_VISIBLE
| WS_TABSTOP
| BS_PUSHBUTTON
,
498 j
==0 ? b1text
: b2text
, j
==0 ? b1id
: b2id
);
501 cp
->ypos
+= height
+ GAPWITHIN
;
505 r
.left
= GAPBETWEEN
; r
.top
= cp
->ypos
;
506 r
.right
= cp
->width
; r
.bottom
= LISTHEIGHT
;
507 cp
->ypos
+= r
.bottom
+ GAPBETWEEN
;
508 doctl(cp
, r
, "LISTBOX",
509 WS_CHILD
| WS_VISIBLE
| WS_TABSTOP
| WS_VSCROLL
| LBS_HASSTRINGS
|
516 * Yet another special control: the character-class setter. A
517 * static, then a list, then a line containing a
518 * button-and-static-and-edit.
520 void charclass(struct ctlpos
*cp
, char *stext
, int sid
, int listid
,
521 char *btext
, int bid
, int eid
, char *s2text
, int s2id
) {
523 const int height
= (STATICHEIGHT
> EDITHEIGHT
&& STATICHEIGHT
> PUSHBTNHEIGHT ?
525 EDITHEIGHT
> PUSHBTNHEIGHT ?
526 EDITHEIGHT
: PUSHBTNHEIGHT
);
527 const static int percents
[] = { 30, 40, 30 };
528 int i
, xpos
, percent
;
529 const int LISTHEIGHT
= 66;
531 /* The static control. */
532 r
.left
= GAPBETWEEN
; r
.top
= cp
->ypos
;
533 r
.right
= cp
->width
; r
.bottom
= STATICHEIGHT
;
534 cp
->ypos
+= r
.bottom
+ GAPWITHIN
;
535 doctl(cp
, r
, "STATIC", WS_CHILD
| WS_VISIBLE
, 0, stext
, sid
);
538 r
.left
= GAPBETWEEN
; r
.top
= cp
->ypos
;
539 r
.right
= cp
->width
; r
.bottom
= LISTHEIGHT
;
540 cp
->ypos
+= r
.bottom
+ GAPWITHIN
;
541 doctl(cp
, r
, "LISTBOX",
542 WS_CHILD
| WS_VISIBLE
| WS_TABSTOP
| WS_VSCROLL
| LBS_HASSTRINGS
|
547 /* The button+static+edit. */
549 for (i
= 0; i
< 3; i
++) {
550 r
.left
= xpos
+ GAPBETWEEN
;
551 percent
+= percents
[i
];
552 xpos
= (cp
->width
+ GAPBETWEEN
) * percent
/ 100;
553 r
.right
= xpos
- r
.left
;
555 r
.bottom
= (i
==0 ? PUSHBTNHEIGHT
:
556 i
==1 ? STATICHEIGHT
:
558 r
.top
+= (height
-r
.bottom
)/2;
560 doctl(cp
, r
, "BUTTON",
561 WS_CHILD
| WS_VISIBLE
| WS_TABSTOP
| BS_PUSHBUTTON
,
564 doctl(cp
, r
, "STATIC", WS_CHILD
| WS_VISIBLE
| SS_CENTER
,
568 WS_CHILD
| WS_VISIBLE
| WS_TABSTOP
| ES_AUTOHSCROLL
,
569 WS_EX_CLIENTEDGE
, "", eid
);
572 cp
->ypos
+= height
+ GAPBETWEEN
;
576 * A special control (horrors!). The colour editor. A static line;
577 * then on the left, a list box, and on the right, a sequence of
578 * two-part statics followed by a button.
580 void colouredit(struct ctlpos
*cp
, char *stext
, int sid
, int listid
,
581 char *btext
, int bid
, ...) {
585 int lwid
, rwid
, rpos
;
586 const int LISTHEIGHT
= 66;
588 /* The static control. */
589 r
.left
= GAPBETWEEN
; r
.top
= cp
->ypos
;
590 r
.right
= cp
->width
; r
.bottom
= STATICHEIGHT
;
591 cp
->ypos
+= r
.bottom
+ GAPWITHIN
;
592 doctl(cp
, r
, "STATIC", WS_CHILD
| WS_VISIBLE
, 0, stext
, sid
);
594 rpos
= GAPBETWEEN
+ 2 * (cp
->width
+ GAPBETWEEN
) / 3;
595 lwid
= rpos
- 2*GAPBETWEEN
;
596 rwid
= cp
->width
+ GAPBETWEEN
- rpos
;
599 r
.left
= GAPBETWEEN
; r
.top
= cp
->ypos
;
600 r
.right
= lwid
; r
.bottom
= LISTHEIGHT
;
601 doctl(cp
, r
, "LISTBOX",
602 WS_CHILD
| WS_VISIBLE
| WS_TABSTOP
| WS_VSCROLL
| LBS_HASSTRINGS
|
613 ltext
= va_arg(ap
, char *);
615 lid
= va_arg(ap
, int);
616 rid
= va_arg(ap
, int);
617 r
.top
= y
; r
.bottom
= STATICHEIGHT
;
618 y
+= r
.bottom
+ GAPWITHIN
;
619 r
.left
= rpos
; r
.right
= rwid
/2;
620 doctl(cp
, r
, "STATIC", WS_CHILD
| WS_VISIBLE
, 0, ltext
, lid
);
621 r
.left
= rpos
+ r
.right
; r
.right
= rwid
- r
.right
;
622 doctl(cp
, r
, "STATIC", WS_CHILD
| WS_VISIBLE
| SS_RIGHT
, 0, "", rid
);
627 r
.top
= y
+ 2*GAPWITHIN
; r
.bottom
= PUSHBTNHEIGHT
;
628 r
.left
= rpos
; r
.right
= rwid
;
629 doctl(cp
, r
, "BUTTON",
630 WS_CHILD
| WS_VISIBLE
| WS_TABSTOP
| BS_PUSHBUTTON
,
633 cp
->ypos
+= LISTHEIGHT
+ GAPBETWEEN
;