1c2c66affSColin Finck/* Unit test suite for resources.
2c2c66affSColin Finck *
3c2c66affSColin Finck * Copyright 2004 Ferenc Wagner
4c2c66affSColin Finck *
5c2c66affSColin Finck * This library is free software; you can redistribute it and/or
6c2c66affSColin Finck * modify it under the terms of the GNU Lesser General Public
7c2c66affSColin Finck * License as published by the Free Software Foundation; either
8c2c66affSColin Finck * version 2.1 of the License, or (at your option) any later version.
9c2c66affSColin Finck *
10c2c66affSColin Finck * This library is distributed in the hope that it will be useful,
11c2c66affSColin Finck * but WITHOUT ANY WARRANTY; without even the implied warranty of
12c2c66affSColin Finck * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13c2c66affSColin Finck * Lesser General Public License for more details.
14c2c66affSColin Finck *
15c2c66affSColin Finck * You should have received a copy of the GNU Lesser General Public
16c2c66affSColin Finck * License along with this library; if not, write to the Free Software
17c2c66affSColin Finck * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18c2c66affSColin Finck */
19c2c66affSColin Finck
20c2c66affSColin Finck#include "windef.h"
21c2c66affSColin Finck#include "winuser.h"
22c2c66affSColin Finck
23c2c66affSColin Finck1 ACCELERATORS
24c2c66affSColin Finck{
25c2c66affSColin Finck  "^N", 1000 /* Ctrl+'N' */
26c2c66affSColin Finck  "N", 1001 /* Shift+'n' */
27c2c66affSColin Finck  "n", 1002 /* 'n' */
28c2c66affSColin Finck}
29c2c66affSColin Finck
30c2c66affSColin Finck2 ACCELERATORS
31c2c66affSColin Finck{
32c2c66affSColin Finck  78, 1000, VIRTKEY, CONTROL /* Ctrl+'N' */
33c2c66affSColin Finck  78, 1001, ASCII /* 'N' */
34c2c66affSColin Finck  110, 1002, ASCII /* 'n' */
35c2c66affSColin Finck  78, 1003, VIRTKEY, ALT /* Alt+'N' */
36c2c66affSColin Finck  78, 1004, VIRTKEY, CONTROL, SHIFT /* Ctrl+Shift+'N' */
37c2c66affSColin Finck  78, 1005, VIRTKEY, CONTROL, ALT, SHIFT /* Ctrl+Alt+Shift+'N' */
38c2c66affSColin Finck}
39c2c66affSColin Finck
40c2c66affSColin FinckSTRINGTABLE
41c2c66affSColin Finck{
42c2c66affSColin Finck  0 "String resource"
43c2c66affSColin Finck  1 "Another string resource"
44c2c66affSColin Finck  2 L"This is a wide string resource"
45c2c66affSColin Finck  65534 "Test high id"
46c2c66affSColin Finck}
47c2c66affSColin Finck
48c2c66affSColin Finck/* Test dialog with a mixed style WS_CHILD | WS_POPUP control */
49c2c66affSColin FinckTEST_DLG_CHILD_POPUP DIALOG 0, 0, 60, 30
50c2c66affSColin FinckSTYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
51c2c66affSColin FinckCAPTION "Test dialog with mixed style controls"
52c2c66affSColin FinckFONT 8, "MS Shell Dlg"
53c2c66affSColin Finck{
54c2c66affSColin Finck  CONTROL "bump7",7,"static",WS_CHILD|WS_POPUP|WS_BORDER,0,0,40,10,WS_EX_TRANSPARENT
55c2c66affSColin Finck  CONTROL "bump8",8,"static",WS_POPUP,0,10,40,10,WS_EX_TRANSPARENT
56c2c66affSColin Finck}
57c2c66affSColin Finck
58c2c66affSColin FinckTEST_DIALOG DIALOG 0, 0, 60, 30
59c2c66affSColin FinckSTYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
60c2c66affSColin FinckCAPTION "Test dialog"
61c2c66affSColin FinckFONT 8, "MS Shell Dlg"
62c2c66affSColin Finck{
63c2c66affSColin Finck  DEFPUSHBUTTON "OK",     IDOK,4,4,50,14, WS_TABSTOP | WS_GROUP
64c2c66affSColin Finck}
65c2c66affSColin Finck
66c2c66affSColin FinckRADIO_TEST_DIALOG DIALOGEX 0, 0, 160, 80
67c2c66affSColin FinckSTYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
68c2c66affSColin FinckCAPTION "Radio Button Test Dialog"
69c2c66affSColin FinckFONT 8, "MS Shell Dlg"
70c2c66affSColin Finck{
71c2c66affSColin Finck  GROUPBOX "Static",      100,6,5,92,70
72c2c66affSColin Finck  CONTROL  "Radio1",      200,"Button",BS_AUTORADIOBUTTON |
73c2c66affSColin Finck                          WS_GROUP | WS_TABSTOP,17,27,39,10
74c2c66affSColin Finck  CONTROL  "Radio2",      201,"Button",BS_AUTORADIOBUTTON,17,40,39,10
75c2c66affSColin Finck  PUSHBUTTON "Cancel",    IDCANCEL,109,20,50,14, WS_TABSTOP | WS_GROUP
76c2c66affSColin Finck}
77c2c66affSColin Finck
78c2c66affSColin FinckAUTORADIO_TEST_DIALOG_1 DIALOGEX 0, 0, 200, 200
79c2c66affSColin FinckSTYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
80c2c66affSColin FinckCAPTION "Radio Button Test Dialog"
81c2c66affSColin FinckFONT 8, "MS Shell Dlg"
82c2c66affSColin Finck{
83c2c66affSColin Finck  CONTROL "Radio1",501,"my_button_class",WS_VISIBLE | WS_CHILD | WS_GROUP | BS_AUTORADIOBUTTON | BS_NOTIFY | WS_TABSTOP,10,10,70,18
84c2c66affSColin Finck  CONTROL "Radio3",503,"my_button_class",WS_VISIBLE | WS_CHILD | BS_RADIOBUTTON | BS_NOTIFY | WS_TABSTOP,10,35,70,18
85c2c66affSColin Finck  CONTROL "Text",504,"my_button_class",WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON | BS_NOTIFY | WS_TABSTOP,10,60,70,18
86c2c66affSColin Finck  CONTROL "Radio2",502,"my_button_class",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_NOTIFY | WS_TABSTOP,10,85,70,18
87c2c66affSColin Finck}
88c2c66affSColin Finck
89c2c66affSColin FinckAUTORADIO_TEST_DIALOG_2 DIALOGEX 0, 0, 200, 200
90c2c66affSColin FinckSTYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
91c2c66affSColin FinckCAPTION "Radio Button Test Dialog"
92c2c66affSColin FinckFONT 8, "MS Shell Dlg"
93c2c66affSColin Finck{
94c2c66affSColin Finck  CONTROL "Radio1",501,"my_button_class",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_NOTIFY | WS_TABSTOP,10,10,70,18
95c2c66affSColin Finck  CONTROL "Radio3",503,"my_button_class",WS_VISIBLE | WS_CHILD | BS_RADIOBUTTON | BS_NOTIFY,10,35,70,18
96c2c66affSColin Finck  CONTROL "Text",504,"my_button_class",WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON | BS_NOTIFY,10,60,70,18
97c2c66affSColin Finck  CONTROL "Radio2",502,"my_button_class",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_NOTIFY,10,85,70,18
98c2c66affSColin Finck}
99c2c66affSColin Finck
100c2c66affSColin FinckCLASS_TEST_DIALOG DIALOG  0, 0, 91, 28
101c2c66affSColin FinckSTYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
102c2c66affSColin FinckCAPTION "CreateDialogParams Test"
103c2c66affSColin FinckCLASS "TestDialog"
104c2c66affSColin FinckFONT 8, "MS Shell Dlg"
105c2c66affSColin Finck{
106c2c66affSColin Finck}
107c2c66affSColin Finck
108c2c66affSColin FinckCLASS_TEST_DIALOG_2 DIALOG  0, 0, 100, 100
109c2c66affSColin FinckSTYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
110c2c66affSColin FinckCAPTION "CreateDialogParams Test"
111c2c66affSColin FinckCLASS "MyDialogClass"
112c2c66affSColin FinckFONT 8, "MS Shell Dlg"
113c2c66affSColin Finck{
114c2c66affSColin Finck}
115c2c66affSColin Finck
116c2c66affSColin FinckFOCUS_TEST_DIALOG DIALOG 0, 0, 60, 30
117c2c66affSColin FinckSTYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_CONTROL
118c2c66affSColin FinckCAPTION "Test dialog"
119c2c66affSColin FinckFONT 8, "MS Shell Dlg"
120c2c66affSColin Finck{
121c2c66affSColin Finck  EDITTEXT                200,4,4,50,14
122c2c66affSColin Finck}
123c2c66affSColin Finck
124c2c66affSColin FinckFOCUS_TEST_DIALOG_2 DIALOG 0, 0, 60, 30
125c2c66affSColin FinckSTYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
126c2c66affSColin FinckCAPTION "Test dialog"
127c2c66affSColin FinckFONT 8, "MS Shell Dlg"
128c2c66affSColin Finck{
129c2c66affSColin Finck  LTEXT "Hello world",    200,4,4,50,14
130c2c66affSColin Finck}
131c2c66affSColin Finck
132c2c66affSColin FinckFOCUS_TEST_DIALOG_3 DIALOG 0, 0, 60, 30
133c2c66affSColin FinckSTYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
134c2c66affSColin FinckCAPTION "Test dialog"
135c2c66affSColin FinckFONT 8, "MS Shell Dlg"
136c2c66affSColin Finck{
137c2c66affSColin Finck  EDITTEXT                200,4,4,50,14
138c2c66affSColin Finck}
139c2c66affSColin Finck
140c2c66affSColin FinckFOCUS_TEST_DIALOG_4 DIALOG 0, 0, 60, 30
141c2c66affSColin FinckSTYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
142c2c66affSColin FinckCAPTION "Test dialog"
143c2c66affSColin FinckCLASS "MyDialogClass"
144c2c66affSColin FinckFONT 8, "MS Shell Dlg"
145c2c66affSColin Finck{
146c2c66affSColin Finck  EDITTEXT                200,4,4,50,14
147c2c66affSColin Finck}
148c2c66affSColin Finck
149c2c66affSColin FinckTEST_DIALOG_INVALID_CLASS DIALOG  0, 0, 60, 30
150c2c66affSColin FinckSTYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
151c2c66affSColin Finck{
152c2c66affSColin Finck    CONTROL "",1,"wine invalid class",WS_CHILD,0,0,40,10
153c2c66affSColin Finck}
154c2c66affSColin Finck
155c2c66affSColin FinckIDD_DIALOG DIALOG  0, 0, 186, 95
156c2c66affSColin FinckSTYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
157c2c66affSColin FinckCAPTION "Dialog"
158c2c66affSColin FinckFONT 8, "MS Sans Serif"
159c2c66affSColin FinckBEGIN
160c2c66affSColin Finck    DEFPUSHBUTTON   "OK",IDOK,129,7,50,14
161c2c66affSColin Finck    PUSHBUTTON      "Cancel",IDCANCEL,129,24,50,14
162c2c66affSColin FinckEND
163c2c66affSColin Finck
164c2c66affSColin FinckTEST_EMPTY_DIALOG DIALOG  0, 0, 186, 95
165c2c66affSColin FinckSTYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
166c2c66affSColin FinckCAPTION "Dialog"
167c2c66affSColin FinckFONT 8, "MS Sans Serif"
168c2c66affSColin FinckBEGIN
169c2c66affSColin FinckEND
170c2c66affSColin Finck
171c2c66affSColin FinckMULTI_EDIT_DIALOG DIALOG 0, 0, 160, 75
172c2c66affSColin FinckSTYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
173c2c66affSColin FinckCAPTION "Multiple Edit Test"
174c2c66affSColin FinckFONT 8, "MS Shell Dlg"
175c2c66affSColin Finck{
176c2c66affSColin Finck    EDITTEXT 1000, 5, 5, 150, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_MULTILINE | ES_WANTRETURN
177c2c66affSColin Finck    EDITTEXT 1001, 5, 25, 150, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
178c2c66affSColin Finck    EDITTEXT 1002, 5, 45, 150, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
179c2c66affSColin Finck}
180c2c66affSColin Finck
181c2c66affSColin FinckEDIT_DIALOG DIALOG 0, 0, 160, 80
182c2c66affSColin FinckSTYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
183c2c66affSColin FinckCAPTION "Edit Test"
184c2c66affSColin FinckFONT 8, "MS Shell Dlg"
185c2c66affSColin Finck{
186c2c66affSColin Finck    PUSHBUTTON "OK", IDOK, 20, 60, 50, 14,  WS_CHILD | WS_VISIBLE | WS_TABSTOP
187c2c66affSColin Finck    PUSHBUTTON "Cancel", IDCANCEL, 100, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
188c2c66affSColin Finck    EDITTEXT 1000, 5, 5, 150, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_MULTILINE | WS_VSCROLL | ES_AUTOVSCROLL
189c2c66affSColin Finck}
190c2c66affSColin Finck
191c2c66affSColin FinckEDIT_SINGLELINE_DIALOG DIALOG 0, 0, 160, 80
192c2c66affSColin FinckSTYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
193c2c66affSColin FinckCAPTION "Edit Test"
194c2c66affSColin FinckFONT 8, "MS Shell Dlg"
195c2c66affSColin Finck{
196c2c66affSColin Finck    PUSHBUTTON "OK", IDOK, 20, 60, 50, 14,  WS_CHILD | WS_VISIBLE | WS_TABSTOP
197c2c66affSColin Finck    PUSHBUTTON "Cancel", IDCANCEL, 100, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
198c2c66affSColin Finck    EDITTEXT 1000, 5, 5, 150, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | ES_AUTOVSCROLL
199c2c66affSColin Finck}
200c2c66affSColin Finck
201c2c66affSColin FinckEDIT_SINGLELINE_WANTRETURN_DIALOG DIALOG 0, 0, 160, 80
202c2c66affSColin FinckSTYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
203c2c66affSColin FinckCAPTION "Edit Test"
204c2c66affSColin FinckFONT 8, "MS Shell Dlg"
205c2c66affSColin Finck{
206c2c66affSColin Finck    PUSHBUTTON "OK", IDOK, 20, 60, 50, 14,  WS_CHILD | WS_VISIBLE | WS_TABSTOP
207c2c66affSColin Finck    PUSHBUTTON "Cancel", IDCANCEL, 100, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
208c2c66affSColin Finck    EDITTEXT 1000, 5, 5, 150, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | ES_AUTOVSCROLL | ES_WANTRETURN
209c2c66affSColin Finck}
210c2c66affSColin Finck
211c2c66affSColin FinckEDIT_WANTRETURN_DIALOG DIALOG 0, 0, 160, 80
212c2c66affSColin FinckSTYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
213c2c66affSColin FinckCAPTION "Edit Test"
214c2c66affSColin FinckFONT 8, "MS Shell Dlg"
215c2c66affSColin Finck{
216c2c66affSColin Finck    PUSHBUTTON "OK", IDOK, 20, 60, 50, 14,  WS_CHILD | WS_VISIBLE | WS_TABSTOP
217c2c66affSColin Finck    PUSHBUTTON "Cancel", IDCANCEL, 100, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
218c2c66affSColin Finck    EDITTEXT 1000, 5, 5, 150, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_MULTILINE | WS_VSCROLL | ES_AUTOVSCROLL | ES_WANTRETURN
219c2c66affSColin Finck}
220c2c66affSColin Finck
221c2c66affSColin FinckEDIT_READONLY_DIALOG DIALOG 0, 0, 160, 80
222c2c66affSColin FinckSTYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
223c2c66affSColin FinckCAPTION "Edit Readonly Test"
224c2c66affSColin FinckFONT 8, "MS Shell Dlg"
225c2c66affSColin Finck{
226c2c66affSColin Finck    PUSHBUTTON "OK", IDOK, 20, 60, 50, 14,  WS_CHILD | WS_VISIBLE | WS_TABSTOP
227c2c66affSColin Finck    PUSHBUTTON "Cancel", IDCANCEL, 100, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
228c2c66affSColin Finck    EDITTEXT 1000, 5, 5, 150, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_MULTILINE | WS_VSCROLL | ES_AUTOVSCROLL | ES_READONLY
229c2c66affSColin Finck}
230c2c66affSColin Finck
231c2c66affSColin FinckCUSTOM_TEST_DIALOG DIALOGEX 6, 15, 207, 111
232c2c66affSColin FinckSTYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
233c2c66affSColin FinckCAPTION "Custom Test Dialog"
234c2c66affSColin FinckFONT 8, "MS Sans Serif"
235c2c66affSColin Finck{
236c2c66affSColin Finck    CONTROL "evenlengthtext", -1, "TESTCONTROL", WS_CHILD|WS_VISIBLE|WS_BORDER|WS_TABSTOP, 10,10,100,50 { 1,2,3,4,5 }
237c2c66affSColin Finck    CONTROL "oddlengthtext", -1, "TESTCONTROL", WS_CHILD|WS_VISIBLE|WS_BORDER|WS_TABSTOP, 10,60,100,50 { 1,2,3,4,5 }
238c2c66affSColin Finck}
239c2c66affSColin Finck
240*7a62c32bSAmine KhaldiGETDLGITEM_TEST_DIALOG DIALOGEX 6, 15, 207, 111
241*7a62c32bSAmine KhaldiSTYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
242*7a62c32bSAmine KhaldiCAPTION "Test Dialog"
243*7a62c32bSAmine KhaldiFONT 8, "MS Shell Dlg"
244*7a62c32bSAmine Khaldi{
245*7a62c32bSAmine Khaldi    LTEXT "Text1",-1,10,10,100,50
246*7a62c32bSAmine Khaldi    LTEXT "Text2",-2,10,10,100,50
247*7a62c32bSAmine Khaldi}
248*7a62c32bSAmine Khaldi
249c2c66affSColin Finck/* @makedep: test_mono.bmp */
250c2c66affSColin Finck100 BITMAP test_mono.bmp
251c2c66affSColin Finck
252c2c66affSColin Finck1 MENU
253c2c66affSColin Finck{
254c2c66affSColin Finck    POPUP "&File"
255c2c66affSColin Finck    {
256c2c66affSColin Finck        POPUP "&New..."
257c2c66affSColin Finck        {
258c2c66affSColin Finck            MENUITEM "&New file", 100
259c2c66affSColin Finck        }
260c2c66affSColin Finck        MENUITEM "&Open", 101
261c2c66affSColin Finck        MENUITEM "&Save", 102
262c2c66affSColin Finck        MENUITEM SEPARATOR
263c2c66affSColin Finck        MENUITEM "E&xit", 103
264c2c66affSColin Finck    }
265c2c66affSColin Finck    POPUP "&Edit"
266c2c66affSColin Finck    {
267c2c66affSColin Finck        MENUITEM "&Undo", 200
268c2c66affSColin Finck        MENUITEM SEPARATOR
269c2c66affSColin Finck        MENUITEM "Cu&t", 201
270c2c66affSColin Finck        MENUITEM "&Copy", 202
271c2c66affSColin Finck        MENUITEM "&Paste", 203
272c2c66affSColin Finck        MENUITEM "&Delete", 204
273c2c66affSColin Finck    }
274c2c66affSColin Finck    MENUITEM "&Quit", 300
275c2c66affSColin Finck}
276