1/* Unit test suite for resources. 2 * 3 * Copyright 2004 Ferenc Wagner 4 * 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. 9 * 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. 14 * 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 18 */ 19 20#include "windef.h" 21#include "winuser.h" 22 231 ACCELERATORS 24{ 25 "^N", 1000 /* Ctrl+'N' */ 26 "N", 1001 /* Shift+'n' */ 27 "n", 1002 /* 'n' */ 28} 29 302 ACCELERATORS 31{ 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' */ 38} 39 40STRINGTABLE 41{ 42 0 "String resource" 43 1 "Another string resource" 44 2 L"This is a wide string resource" 45 65534 "Test high id" 46} 47 48/* Test dialog with a mixed style WS_CHILD | WS_POPUP control */ 49TEST_DLG_CHILD_POPUP DIALOG 0, 0, 60, 30 50STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU 51CAPTION "Test dialog with mixed style controls" 52FONT 8, "MS Shell Dlg" 53{ 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 56} 57 58TEST_DIALOG DIALOG 0, 0, 60, 30 59STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE 60CAPTION "Test dialog" 61FONT 8, "MS Shell Dlg" 62{ 63 DEFPUSHBUTTON "OK", IDOK,4,4,50,14, WS_TABSTOP | WS_GROUP 64} 65 66RADIO_TEST_DIALOG DIALOGEX 0, 0, 160, 80 67STYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU 68CAPTION "Radio Button Test Dialog" 69FONT 8, "MS Shell Dlg" 70{ 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 76} 77 78AUTORADIO_TEST_DIALOG_1 DIALOGEX 0, 0, 200, 200 79STYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_VISIBLE 80CAPTION "Radio Button Test Dialog" 81FONT 8, "MS Shell Dlg" 82{ 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 87} 88 89AUTORADIO_TEST_DIALOG_2 DIALOGEX 0, 0, 200, 200 90STYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_VISIBLE 91CAPTION "Radio Button Test Dialog" 92FONT 8, "MS Shell Dlg" 93{ 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 98} 99 100CLASS_TEST_DIALOG DIALOG 0, 0, 91, 28 101STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU 102CAPTION "CreateDialogParams Test" 103CLASS "TestDialog" 104FONT 8, "MS Shell Dlg" 105{ 106} 107 108CLASS_TEST_DIALOG_2 DIALOG 0, 0, 100, 100 109STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU 110CAPTION "CreateDialogParams Test" 111CLASS "MyDialogClass" 112FONT 8, "MS Shell Dlg" 113{ 114} 115 116FOCUS_TEST_DIALOG DIALOG 0, 0, 60, 30 117STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_CONTROL 118CAPTION "Test dialog" 119FONT 8, "MS Shell Dlg" 120{ 121 EDITTEXT 200,4,4,50,14 122} 123 124FOCUS_TEST_DIALOG_2 DIALOG 0, 0, 60, 30 125STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU 126CAPTION "Test dialog" 127FONT 8, "MS Shell Dlg" 128{ 129 LTEXT "Hello world", 200,4,4,50,14 130} 131 132FOCUS_TEST_DIALOG_3 DIALOG 0, 0, 60, 30 133STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU 134CAPTION "Test dialog" 135FONT 8, "MS Shell Dlg" 136{ 137 EDITTEXT 200,4,4,50,14 138} 139 140FOCUS_TEST_DIALOG_4 DIALOG 0, 0, 60, 30 141STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU 142CAPTION "Test dialog" 143CLASS "MyDialogClass" 144FONT 8, "MS Shell Dlg" 145{ 146 EDITTEXT 200,4,4,50,14 147} 148 149TEST_DIALOG_INVALID_CLASS DIALOG 0, 0, 60, 30 150STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU 151{ 152 CONTROL "",1,"wine invalid class",WS_CHILD,0,0,40,10 153} 154 155IDD_DIALOG DIALOG 0, 0, 186, 95 156STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU 157CAPTION "Dialog" 158FONT 8, "MS Sans Serif" 159BEGIN 160 DEFPUSHBUTTON "OK",IDOK,129,7,50,14 161 PUSHBUTTON "Cancel",IDCANCEL,129,24,50,14 162END 163 164TEST_EMPTY_DIALOG DIALOG 0, 0, 186, 95 165STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU 166CAPTION "Dialog" 167FONT 8, "MS Sans Serif" 168BEGIN 169END 170 171MULTI_EDIT_DIALOG DIALOG 0, 0, 160, 75 172STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER 173CAPTION "Multiple Edit Test" 174FONT 8, "MS Shell Dlg" 175{ 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 179} 180 181EDIT_DIALOG DIALOG 0, 0, 160, 80 182STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER 183CAPTION "Edit Test" 184FONT 8, "MS Shell Dlg" 185{ 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 189} 190 191EDIT_SINGLELINE_DIALOG DIALOG 0, 0, 160, 80 192STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER 193CAPTION "Edit Test" 194FONT 8, "MS Shell Dlg" 195{ 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 199} 200 201EDIT_SINGLELINE_WANTRETURN_DIALOG DIALOG 0, 0, 160, 80 202STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER 203CAPTION "Edit Test" 204FONT 8, "MS Shell Dlg" 205{ 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 209} 210 211EDIT_WANTRETURN_DIALOG DIALOG 0, 0, 160, 80 212STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER 213CAPTION "Edit Test" 214FONT 8, "MS Shell Dlg" 215{ 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 219} 220 221EDIT_READONLY_DIALOG DIALOG 0, 0, 160, 80 222STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER 223CAPTION "Edit Readonly Test" 224FONT 8, "MS Shell Dlg" 225{ 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 229} 230 231CUSTOM_TEST_DIALOG DIALOGEX 6, 15, 207, 111 232STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU 233CAPTION "Custom Test Dialog" 234FONT 8, "MS Sans Serif" 235{ 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 } 238} 239 240/* @makedep: test_mono.bmp */ 241100 BITMAP test_mono.bmp 242 2431 MENU 244{ 245 POPUP "&File" 246 { 247 POPUP "&New..." 248 { 249 MENUITEM "&New file", 100 250 } 251 MENUITEM "&Open", 101 252 MENUITEM "&Save", 102 253 MENUITEM SEPARATOR 254 MENUITEM "E&xit", 103 255 } 256 POPUP "&Edit" 257 { 258 MENUITEM "&Undo", 200 259 MENUITEM SEPARATOR 260 MENUITEM "Cu&t", 201 261 MENUITEM "&Copy", 202 262 MENUITEM "&Paste", 203 263 MENUITEM "&Delete", 204 264 } 265 MENUITEM "&Quit", 300 266} 267