No need to define __USE_W32API
[reactos.git] / rosapps / dflat32 / dialbox.h
1 /* ----------------- dialbox.h ---------------- */
2
3 #ifndef DIALOG_H
4 #define DIALOG_H
5
6 #include <stdio.h>
7
8 #define DF_MAXCONTROLS 30
9 #define DF_MAXRADIOS 20
10
11 #define DF_OFF FALSE
12 #define DF_ON TRUE
13
14 /* -------- dialog box and control window structure ------- */
15 typedef struct {
16 char *title; /* window title */
17 int x, y; /* relative coordinates */
18 int h, w; /* size */
19 } DF_DIALOGWINDOW;
20
21 /* ------ one of these for each control window ------- */
22 typedef struct {
23 DF_DIALOGWINDOW dwnd;
24 DFCLASS class; /* DF_LISTBOX, DF_BUTTON, etc */
25 char *itext; /* initialized text */
26 int command; /* command code */
27 char *help; /* help mnemonic */
28 BOOL isetting; /* initially DF_ON or DF_OFF */
29 BOOL setting; /* DF_ON or DF_OFF */
30 void *wnd; /* window handle */
31 } DF_CTLWINDOW;
32
33 /* --------- one of these for each dialog box ------- */
34 typedef struct {
35 char *HelpName;
36 DF_DIALOGWINDOW dwnd;
37 DF_CTLWINDOW ctl[DF_MAXCONTROLS+1];
38 } DF_DBOX;
39
40 /* -------- macros for dialog box resource compile -------- */
41 #define DF_DIALOGBOX(db) DF_DBOX db={ #db,
42 #define DF_DB_TITLE(ttl,x,y,h,w) {ttl,x,y,h,w},{
43 #define DF_CONTROL(ty,tx,x,y,h,w,c) \
44 {{NULL,x,y,h,w},ty, \
45 (ty==DF_EDITBOX||ty==DF_COMBOBOX?NULL:tx), \
46 c,#c,(ty==DF_BUTTON?DF_ON:DF_OFF),DF_OFF,NULL},
47
48 #define DF_ENDDB {{NULL}} }};
49
50 #define DfCancel " Cancel "
51 #define DfOk " OK "
52 #define DfYes " Yes "
53 #define DfNo " No "
54
55 #endif