1 /* Unit test suite for resources.
3 * Copyright 2004 Ferenc Wagner
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 "^N", 1000 /* Ctrl+'N' */
26 "N", 1001 /* Shift+'n' */
32 78, 1000, VIRTKEY, CONTROL /* Ctrl+'N' */
33 78, 1001, ASCII /* 'N' */
34 110, 1002, ASCII /* 'n' */
35 78, 1003, VIRTKEY, ALT /* Alt+'N' */
36 78, 1004, VIRTKEY, CONTROL, SHIFT /* Ctrl+Shift+'N' */
37 78, 1005, VIRTKEY, CONTROL, ALT, SHIFT /* Ctrl+Alt+Shift+'N' */
43 1 "Another string resource"
44 2 L"This is a wide string resource"
48 /* Test dialog with a mixed style WS_CHILD | WS_POPUP control */
49 TEST_DLG_CHILD_POPUP DIALOG 0, 0, 60, 30
50 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
51 CAPTION "Test dialog with mixed style controls"
52 FONT 8, "MS Shell Dlg"
54 CONTROL "bump7",7,"static",WS_CHILD|WS_POPUP|WS_BORDER,0,0,40,10,WS_EX_TRANSPARENT
55 CONTROL "bump8",8,"static",WS_POPUP,0,10,40,10,WS_EX_TRANSPARENT
58 TEST_DIALOG DIALOG 0, 0, 60, 30
59 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
61 FONT 8, "MS Shell Dlg"
63 DEFPUSHBUTTON "OK", IDOK,4,4,50,14, WS_TABSTOP | WS_GROUP
66 RADIO_TEST_DIALOG DIALOGEX 0, 0, 160, 80
67 STYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
68 CAPTION "Radio Button Test Dialog"
69 FONT 8, "MS Shell Dlg"
71 GROUPBOX "Static", 100,6,5,92,70
72 CONTROL "Radio1", 200,"Button",BS_AUTORADIOBUTTON |
73 WS_GROUP | WS_TABSTOP,17,27,39,10
74 CONTROL "Radio2", 201,"Button",BS_AUTORADIOBUTTON,17,40,39,10
75 PUSHBUTTON "Cancel", IDCANCEL,109,20,50,14, WS_TABSTOP | WS_GROUP
78 AUTORADIO_TEST_DIALOG_1 DIALOGEX 0, 0, 200, 200
79 STYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
80 CAPTION "Radio Button Test Dialog"
81 FONT 8, "MS Shell Dlg"
83 CONTROL "Radio1",501,"my_button_class",WS_VISIBLE | WS_CHILD | WS_GROUP | BS_AUTORADIOBUTTON | BS_NOTIFY | WS_TABSTOP,10,10,70,18
84 CONTROL "Radio3",503,"my_button_class",WS_VISIBLE | WS_CHILD | BS_RADIOBUTTON | BS_NOTIFY | WS_TABSTOP,10,35,70,18
85 CONTROL "Text",504,"my_button_class",WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON | BS_NOTIFY | WS_TABSTOP,10,60,70,18
86 CONTROL "Radio2",502,"my_button_class",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_NOTIFY | WS_TABSTOP,10,85,70,18
89 AUTORADIO_TEST_DIALOG_2 DIALOGEX 0, 0, 200, 200
90 STYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
91 CAPTION "Radio Button Test Dialog"
92 FONT 8, "MS Shell Dlg"
94 CONTROL "Radio1",501,"my_button_class",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_NOTIFY | WS_TABSTOP,10,10,70,18
95 CONTROL "Radio3",503,"my_button_class",WS_VISIBLE | WS_CHILD | BS_RADIOBUTTON | BS_NOTIFY,10,35,70,18
96 CONTROL "Text",504,"my_button_class",WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON | BS_NOTIFY,10,60,70,18
97 CONTROL "Radio2",502,"my_button_class",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_NOTIFY,10,85,70,18
100 CLASS_TEST_DIALOG DIALOG 0, 0, 91, 28
101 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
102 CAPTION "CreateDialogParams Test"
104 FONT 8, "MS Shell Dlg"
108 CLASS_TEST_DIALOG_2 DIALOG 0, 0, 100, 100
109 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
110 CAPTION "CreateDialogParams Test"
111 CLASS "MyDialogClass"
112 FONT 8, "MS Shell Dlg"
116 FOCUS_TEST_DIALOG DIALOG 0, 0, 60, 30
117 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_CONTROL
118 CAPTION "Test dialog"
119 FONT 8, "MS Shell Dlg"
121 EDITTEXT 200,4,4,50,14
124 FOCUS_TEST_DIALOG_2 DIALOG 0, 0, 60, 30
125 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
126 CAPTION "Test dialog"
127 FONT 8, "MS Shell Dlg"
129 LTEXT "Hello world", 200,4,4,50,14
132 FOCUS_TEST_DIALOG_3 DIALOG 0, 0, 60, 30
133 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
134 CAPTION "Test dialog"
135 FONT 8, "MS Shell Dlg"
137 EDITTEXT 200,4,4,50,14
140 FOCUS_TEST_DIALOG_4 DIALOG 0, 0, 60, 30
141 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
142 CAPTION "Test dialog"
143 CLASS "MyDialogClass"
144 FONT 8, "MS Shell Dlg"
146 EDITTEXT 200,4,4,50,14
149 TEST_DIALOG_INVALID_CLASS DIALOG 0, 0, 60, 30
150 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
152 CONTROL "",1,"wine invalid class",WS_CHILD,0,0,40,10
155 IDD_DIALOG DIALOG 0, 0, 186, 95
156 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
158 FONT 8, "MS Sans Serif"
160 DEFPUSHBUTTON "OK",IDOK,129,7,50,14
161 PUSHBUTTON "Cancel",IDCANCEL,129,24,50,14
164 TEST_EMPTY_DIALOG DIALOG 0, 0, 186, 95
165 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
167 FONT 8, "MS Sans Serif"
171 MULTI_EDIT_DIALOG DIALOG 0, 0, 160, 75
172 STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
173 CAPTION "Multiple Edit Test"
174 FONT 8, "MS Shell Dlg"
176 EDITTEXT 1000, 5, 5, 150, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_MULTILINE | ES_WANTRETURN
177 EDITTEXT 1001, 5, 25, 150, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
178 EDITTEXT 1002, 5, 45, 150, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
181 EDIT_DIALOG DIALOG 0, 0, 160, 80
182 STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
184 FONT 8, "MS Shell Dlg"
186 PUSHBUTTON "OK", IDOK, 20, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
187 PUSHBUTTON "Cancel", IDCANCEL, 100, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
188 EDITTEXT 1000, 5, 5, 150, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_MULTILINE | WS_VSCROLL | ES_AUTOVSCROLL
191 EDIT_SINGLELINE_DIALOG DIALOG 0, 0, 160, 80
192 STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
194 FONT 8, "MS Shell Dlg"
196 PUSHBUTTON "OK", IDOK, 20, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
197 PUSHBUTTON "Cancel", IDCANCEL, 100, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
198 EDITTEXT 1000, 5, 5, 150, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | ES_AUTOVSCROLL
201 EDIT_SINGLELINE_WANTRETURN_DIALOG DIALOG 0, 0, 160, 80
202 STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
204 FONT 8, "MS Shell Dlg"
206 PUSHBUTTON "OK", IDOK, 20, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
207 PUSHBUTTON "Cancel", IDCANCEL, 100, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
208 EDITTEXT 1000, 5, 5, 150, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | ES_AUTOVSCROLL | ES_WANTRETURN
211 EDIT_WANTRETURN_DIALOG DIALOG 0, 0, 160, 80
212 STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
214 FONT 8, "MS Shell Dlg"
216 PUSHBUTTON "OK", IDOK, 20, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
217 PUSHBUTTON "Cancel", IDCANCEL, 100, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
218 EDITTEXT 1000, 5, 5, 150, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_MULTILINE | WS_VSCROLL | ES_AUTOVSCROLL | ES_WANTRETURN
221 EDIT_READONLY_DIALOG DIALOG 0, 0, 160, 80
222 STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
223 CAPTION "Edit Readonly Test"
224 FONT 8, "MS Shell Dlg"
226 PUSHBUTTON "OK", IDOK, 20, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
227 PUSHBUTTON "Cancel", IDCANCEL, 100, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
228 EDITTEXT 1000, 5, 5, 150, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_MULTILINE | WS_VSCROLL | ES_AUTOVSCROLL | ES_READONLY
231 CUSTOM_TEST_DIALOG DIALOGEX 6, 15, 207, 111
232 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
233 CAPTION "Custom Test Dialog"
234 FONT 8, "MS Sans Serif"
236 CONTROL "evenlengthtext", -1, "TESTCONTROL", WS_CHILD|WS_VISIBLE|WS_BORDER|WS_TABSTOP, 10,10,100,50 { 1,2,3,4,5 }
237 CONTROL "oddlengthtext", -1, "TESTCONTROL", WS_CHILD|WS_VISIBLE|WS_BORDER|WS_TABSTOP, 10,60,100,50 { 1,2,3,4,5 }
240 GETDLGITEM_TEST_DIALOG DIALOGEX 6, 15, 207, 111
241 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
242 CAPTION "Test Dialog"
243 FONT 8, "MS Shell Dlg"
245 LTEXT "Text1",-1,10,10,100,50
246 LTEXT "Text2",-2,10,10,100,50
249 /* @makedep: test_mono.bmp */
250 100 BITMAP test_mono.bmp
252 /* @makedep: bmp1x1_32bpp.bmp */
253 101 BITMAP bmp1x1_32bpp.bmp
261 MENUITEM "&New file", 100
263 MENUITEM "&Open", 101
264 MENUITEM "&Save", 102
266 MENUITEM "E&xit", 103
270 MENUITEM "&Undo", 200
273 MENUITEM "&Copy", 202
274 MENUITEM "&Paste", 203
275 MENUITEM "&Delete", 204
277 MENUITEM "&Quit", 300