source: trunk/src/pe2lx/dialog.h@ 46

Last change on this file since 46 was 46, checked in by sandervl, 26 years ago

* empty log message *

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