1 | /* $Id: dialog.h,v 1.1 1999-05-24 20:19:54 ktk Exp $ */
|
---|
2 |
|
---|
3 | /*
|
---|
4 | * PE2LX dialog conversion code
|
---|
5 | *
|
---|
6 | * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
|
---|
7 | * Copyright 1998 Patrick Haller
|
---|
8 | * Copyright 1998 Peter Fitzsimmons
|
---|
9 | *
|
---|
10 | *
|
---|
11 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
12 | *
|
---|
13 | */
|
---|
14 | #ifndef __DIALOG_H__
|
---|
15 | #define __DIALOG_H__
|
---|
16 |
|
---|
17 | #pragma pack(1) /*PLF Sat 97-06-21 20:19:30*/
|
---|
18 |
|
---|
19 | //dialog structs
|
---|
20 | typedef struct {
|
---|
21 | DWORD lStyle;
|
---|
22 | DWORD lExtendedStyle; // new for NT
|
---|
23 | WORD NumberOfItems;
|
---|
24 | WORD x;
|
---|
25 | WORD y;
|
---|
26 | WORD cx;
|
---|
27 | WORD cy;
|
---|
28 | WORD fNameOrd; //0xFFFF -> ord, else null terminated WCHAR string
|
---|
29 | } DialogBoxHeader;
|
---|
30 | // [Name or Ordinal] MenuName;
|
---|
31 | ////The items marked `Name or Ordinal' are the same format used
|
---|
32 | ////throughout the resource file (most notably in each resource header)
|
---|
33 | ////to store a name or an ordinal ID. As before, if the first WORD is an
|
---|
34 | ////0xffff, the next two bytes contain an ordinal ID. Otherwise, the
|
---|
35 | ////first 1 or more WORDS contain a null-terminated string. An empty
|
---|
36 | ////string is represented by a single WORD zero in the first location.
|
---|
37 | // [Name or Ordinal] ClassName;
|
---|
38 | // WCHAR szCaption[];
|
---|
39 |
|
---|
40 | typedef struct {
|
---|
41 | WORD wPointSize; // Only here if FONT set for dialog
|
---|
42 | WCHAR szFontName[1]; // This too /*PLF Sat 97-06-21 20:19:31*/
|
---|
43 | } FontHeader;
|
---|
44 |
|
---|
45 | #define DS_SETFONT 0x40
|
---|
46 |
|
---|
47 | typedef struct {
|
---|
48 | DWORD lStyle;
|
---|
49 | DWORD lExtendedStyle;
|
---|
50 | WORD x;
|
---|
51 | WORD y;
|
---|
52 | WORD cx;
|
---|
53 | WORD cy;
|
---|
54 | WORD wId;
|
---|
55 | WORD fClassId; //0xFFFF -> ord, 0 -> null string, else null terminated WCHAR string
|
---|
56 | // [Name or Ordinal] ClassId;
|
---|
57 | // [Name or Ordinal] Text;
|
---|
58 | // WORD nExtraStuff;
|
---|
59 | } ControlData;
|
---|
60 |
|
---|
61 |
|
---|
62 | typedef struct tagWINDLGTEMPLATEEX{
|
---|
63 | WORD wDlgVer; // use 1
|
---|
64 | WORD wSignature; // use 0xFFFF
|
---|
65 | DWORD dwHelpID; // Dialog's context help ID
|
---|
66 | DWORD lExtendedStyle;
|
---|
67 | DWORD lStyle;
|
---|
68 | WORD NumberOfItems; // Number of controls in dialog
|
---|
69 | short x; // Initial position, horizontal
|
---|
70 | short y; // Initial position, vertical
|
---|
71 | short cx; // Width
|
---|
72 | short cy; // Height
|
---|
73 | WORD fNameOrd; // 0xFFFF -> ord, else null terminated WCHAR string
|
---|
74 | } WINDLGTEMPLATEEX;
|
---|
75 | //This is followed by menu name, class name, title, and font info if style
|
---|
76 | //includes DS_SETFONT, which have the same form as documented in the SDK for
|
---|
77 | //DLGTEMPLATE.
|
---|
78 |
|
---|
79 | typedef struct tagWINDLGITEMTEMPLATEEX{
|
---|
80 | DWORD dwHelpID; // Context help ID for control
|
---|
81 | DWORD lExtendedStyle;
|
---|
82 | DWORD lStyle;
|
---|
83 | short x; // Initial position, horizontal
|
---|
84 | short y; // Initial position, vertical
|
---|
85 | short cx; // Width
|
---|
86 | short cy; // Height
|
---|
87 | DWORD wId; // Window ID
|
---|
88 | WORD fClassId; // 0xFFFF -> ord, 0 -> null string, else null terminated WCHAR string
|
---|
89 | // [Name or Ordinal] ClassId;
|
---|
90 | // [Name or Ordinal] Text;
|
---|
91 | } WINDLGITEMTEMPLATEEX;
|
---|
92 | //This is followed by class name, title, and creation data for the control,
|
---|
93 | //which have the same form as documented in the SDK for DLGITEMTEMPLATE.
|
---|
94 |
|
---|
95 | //SvL: Yeah, right!
|
---|
96 | typedef struct {
|
---|
97 | WORD wPointSize; // Only here if FONT set for dialog
|
---|
98 | DWORD whatever;
|
---|
99 | WCHAR szFontName[1]; // This too /*PLF Sat 97-06-21 20:19:31*/
|
---|
100 | } FontHeaderEx;
|
---|
101 |
|
---|
102 | #pragma pack()
|
---|
103 |
|
---|
104 | void ShowDialog(int id, DialogBoxHeader *dhdr, int size);
|
---|
105 |
|
---|
106 |
|
---|
107 | #define WINWS_POPUP 0x80000000L
|
---|
108 | #define WINWS_CHILD 0x40000000L
|
---|
109 | #define WINWS_MINIMIZE 0x20000000L
|
---|
110 | #define WINWS_VISIBLE 0x10000000L
|
---|
111 | #define WINWS_DISABLED 0x08000000L
|
---|
112 | #define WINWS_CLIPSIBLINGS 0x04000000L
|
---|
113 | #define WINWS_CLIPCHILDREN 0x02000000L
|
---|
114 | #define WINWS_MAXIMIZE 0x01000000L
|
---|
115 | #define WINWS_CAPTION 0x00C00000L
|
---|
116 | #define WINWS_BORDER 0x00800000L
|
---|
117 | #define WINWS_DLGFRAME 0x00400000L
|
---|
118 | #define WINWS_VSCROLL 0x00200000L
|
---|
119 | #define WINWS_HSCROLL 0x00100000L
|
---|
120 | #define WINWS_SYSMENU 0x00080000L
|
---|
121 | #define WINWS_THICKFRAME 0x00040000L
|
---|
122 | #define WINWS_GROUP 0x00020000L
|
---|
123 | #define WINWS_TABSTOP 0x00010000L
|
---|
124 | #define WINWS_MINIMIZEBOX 0x00020000L
|
---|
125 | #define WINWS_MAXIMIZEBOX 0x00010000L
|
---|
126 |
|
---|
127 | /*
|
---|
128 | * Extended Window Styles
|
---|
129 | */
|
---|
130 | #define WS_EX_DLGMODALFRAME 0x00000001L
|
---|
131 | #define WS_EX_NOPARENTNOTIFY 0x00000004L
|
---|
132 | #define WS_EX_TOPMOST 0x00000008L
|
---|
133 | #define WS_EX_ACCEPTFILES 0x00000010L
|
---|
134 | #define WS_EX_TRANSPARENT 0x00000020L
|
---|
135 | #define WS_EX_MDICHILD 0x00000040L
|
---|
136 | #define WS_EX_TOOLWINDOW 0x00000080L
|
---|
137 | #define WS_EX_WINDOWEDGE 0x00000100L
|
---|
138 | #define WS_EX_CLIENTEDGE 0x00000200L
|
---|
139 | #define WS_EX_CONTEXTHELP 0x00000400L
|
---|
140 |
|
---|
141 | #define WS_EX_RIGHT 0x00001000L
|
---|
142 | #define WS_EX_LEFT 0x00000000L
|
---|
143 | #define WS_EX_RTLREADING 0x00002000L
|
---|
144 | #define WS_EX_LTRREADING 0x00000000L
|
---|
145 | #define WS_EX_LEFTSCROLLBAR 0x00004000L
|
---|
146 | #define WS_EX_RIGHTSCROLLBAR 0x00000000L
|
---|
147 |
|
---|
148 | #define WS_EX_CONTROLPARENT 0x00010000L
|
---|
149 | #define WS_EX_STATICEDGE 0x00020000L
|
---|
150 | #define WS_EX_APPWINDOW 0x00040000L
|
---|
151 |
|
---|
152 |
|
---|
153 | #define WIN_BUTTON 0x80
|
---|
154 | #define WIN_EDIT 0x81
|
---|
155 | #define WIN_STATIC 0x82
|
---|
156 | #define WIN_LISTBOX 0x83
|
---|
157 | #define WIN_SCROLLBAR 0x84
|
---|
158 | #define WIN_COMBOBOX 0x85
|
---|
159 |
|
---|
160 | #define WINBS_PUSHBUTTON 0x00L
|
---|
161 | #define WINBS_DEFPUSHBUTTON 0x01L
|
---|
162 | #define WINBS_CHECKBOX 0x02L
|
---|
163 | #define WINBS_AUTOCHECKBOX 0x03L
|
---|
164 | #define WINBS_RADIOBUTTON 0x04L
|
---|
165 | #define WINBS_3STATE 0x05L
|
---|
166 | #define WINBS_AUTO3STATE 0x06L
|
---|
167 | #define WINBS_GROUPBOX 0x07L
|
---|
168 | #define WINBS_USERBUTTON 0x08L
|
---|
169 | #define WINBS_AUTORADIOBUTTON 0x09L
|
---|
170 | #define WINBS_OWNERDRAW 0x0BL
|
---|
171 | #define WINBS_LEFTTEXT 0x20L
|
---|
172 |
|
---|
173 | #define WINCBS_SIMPLE 0x0001L
|
---|
174 | #define WINCBS_DROPDOWN 0x0002L
|
---|
175 | #define WINCBS_DROPDOWNLIST 0x0003L
|
---|
176 | #define WINCBS_OWNERDRAWFIXED 0x0010L
|
---|
177 | #define WINCBS_OWNERDRAWVARIABLE 0x0020L
|
---|
178 | #define WINCBS_AUTOHSCROLL 0x0040L
|
---|
179 | #define WINCBS_OEMCONVERT 0x0080L
|
---|
180 | #define WINCBS_SORT 0x0100L
|
---|
181 | #define WINCBS_HASSTRINGS 0x0200L
|
---|
182 | #define WINCBS_NOINTEGRALHEIGHT 0x0400L
|
---|
183 | #define WINCBS_DISABLENOSCROLL 0x0800L
|
---|
184 |
|
---|
185 | #define WINES_LEFT 0x0000L
|
---|
186 | #define WINES_CENTER 0x0001L
|
---|
187 | #define WINES_RIGHT 0x0002L
|
---|
188 | #define WINES_MULTILINE 0x0004L
|
---|
189 | #define WINES_UPPERCASE 0x0008L
|
---|
190 | #define WINES_LOWERCASE 0x0010L
|
---|
191 | #define WINES_PASSWORD 0x0020L
|
---|
192 | #define WINES_AUTOVSCROLL 0x0040L
|
---|
193 | #define WINES_AUTOHSCROLL 0x0080L
|
---|
194 | #define WINES_NOHIDESEL 0x0100L
|
---|
195 | #define WINES_OEMCONVERT 0x0400L
|
---|
196 | #define WINES_READONLY 0x0800L
|
---|
197 | #define WINES_WANTRETURN 0x1000L
|
---|
198 |
|
---|
199 | #define WINLBS_NOTIFY 0x0001L
|
---|
200 | #define WINLBS_SORT 0x0002L
|
---|
201 | #define WINLBS_NOREDRAW 0x0004L
|
---|
202 | #define WINLBS_MULTIPLESEL 0x0008L
|
---|
203 | #define WINLBS_OWNERDRAWFIXED 0x0010L
|
---|
204 | #define WINLBS_OWNERDRAWVARIABLE 0x0020L
|
---|
205 | #define WINLBS_HASSTRINGS 0x0040L
|
---|
206 | #define WINLBS_USETABSTOPS 0x0080L
|
---|
207 | #define WINLBS_NOINTEGRALHEIGHT 0x0100L
|
---|
208 | #define WINLBS_MULTICOLUMN 0x0200L
|
---|
209 | #define WINLBS_WANTKEYBOARDINPUT 0x0400L
|
---|
210 | #define WINLBS_EXTENDEDSEL 0x0800L
|
---|
211 | #define WINLBS_DISABLENOSCROLL 0x1000L
|
---|
212 | #define WINLBS_NODATA 0x2000L
|
---|
213 |
|
---|
214 | #define WINSBS_HORZ 0x0000L
|
---|
215 | #define WINSBS_VERT 0x0001L
|
---|
216 | #define WINSBS_TOPALIGN 0x0002L
|
---|
217 | #define WINSBS_LEFTALIGN 0x0002L
|
---|
218 | #define WINSBS_BOTTOMALIGN 0x0004L
|
---|
219 | #define WINSBS_RIGHTALIGN 0x0004L
|
---|
220 | #define WINSBS_SIZEBOXTOPLEFTALIGN 0x0002L
|
---|
221 | #define WINSBS_SIZEBOXBOTTOMRIGHTALIGN 0x0004L
|
---|
222 | #define WINSBS_SIZEBOX 0x0008L
|
---|
223 |
|
---|
224 | #define WINSS_LEFT 0x00L
|
---|
225 | #define WINSS_CENTER 0x01L
|
---|
226 | #define WINSS_RIGHT 0x02L
|
---|
227 | #define WINSS_ICON 0x03L
|
---|
228 | #define WINSS_BLACKRECT 0x04L
|
---|
229 | #define WINSS_GRAYRECT 0x05L
|
---|
230 | #define WINSS_WHITERECT 0x06L
|
---|
231 | #define WINSS_BLACKFRAME 0x07L
|
---|
232 | #define WINSS_GRAYFRAME 0x08L
|
---|
233 | #define WINSS_WHITEFRAME 0x09L
|
---|
234 | #define WINSS_USERITEM 0x0AL
|
---|
235 | #define WINSS_SIMPLE 0x0BL
|
---|
236 | #define WINSS_LEFTNOWORDWRAP 0x0CL
|
---|
237 | #define WINSS_NOPREFIX 0x80L
|
---|
238 |
|
---|
239 | #endif
|
---|