resource.rc 6.58 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/* Unit test suite for resources.
 *
 * Copyright 2004 Ferenc Wagner
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * 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 21 22
#include "windef.h"
#include "winuser.h"

23 24 25 26 27 28 29 30 31 32 33 34 35
1 ACCELERATORS
{
  "^N", 1000 /* Ctrl+'N' */
  "N", 1001 /* Shift+'n' */
  "n", 1002 /* 'n' */
}

2 ACCELERATORS
{
  78, 1000, VIRTKEY, CONTROL /* Ctrl+'N' */
  78, 1001, ASCII /* 'N' */
  110, 1002, ASCII /* 'n' */
  78, 1003, VIRTKEY, ALT /* Alt+'N' */
36 37
  78, 1004, VIRTKEY, CONTROL, SHIFT /* Ctrl+Shift+'N' */
  78, 1005, VIRTKEY, CONTROL, ALT, SHIFT /* Ctrl+Alt+Shift+'N' */
38 39 40 41 42
}

STRINGTABLE
{
  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 49 50 51 52 53 54 55 56 57
/* Test dialog with a mixed style WS_CHILD | WS_POPUP control */
TEST_DLG_CHILD_POPUP DIALOG 0, 0, 60, 30
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Test dialog with mixed style controls"
FONT 8, "MS Shell Dlg"
{
  CONTROL "bump7",7,"static",WS_CHILD|WS_POPUP|WS_BORDER,0,0,40,10,WS_EX_TRANSPARENT
  CONTROL "bump8",8,"static",WS_POPUP,0,10,40,10,WS_EX_TRANSPARENT
}

58
TEST_DIALOG DIALOG 0, 0, 60, 30
59 60
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
CAPTION "Test dialog"
61
FONT 8, "MS Shell Dlg"
62
{
63
  DEFPUSHBUTTON "OK",     IDOK,4,4,50,14, WS_TABSTOP | WS_GROUP
64
}
65

66 67 68 69
RADIO_TEST_DIALOG DIALOGEX 0, 0, 160, 80
STYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Radio Button Test Dialog"
FONT 8, "MS Shell Dlg"
70
{
71 72 73 74 75
  GROUPBOX "Static",      100,6,5,92,70
  CONTROL  "Radio1",      200,"Button",BS_AUTORADIOBUTTON |
                          WS_GROUP | WS_TABSTOP,17,27,39,10
  CONTROL  "Radio2",      201,"Button",BS_AUTORADIOBUTTON,17,40,39,10
  PUSHBUTTON "Cancel",    IDCANCEL,109,20,50,14, WS_TABSTOP | WS_GROUP
76
}
77

78
CLASS_TEST_DIALOG DIALOG  0, 0, 91, 28
79 80 81
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "CreateDialogParams Test"
CLASS "TestDialog"
82
FONT 8, "MS Shell Dlg"
83 84
{
}
85

86
CLASS_TEST_DIALOG_2 DIALOG  0, 0, 100, 100
87 88 89 90 91 92 93
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "CreateDialogParams Test"
CLASS "MyDialogClass"
FONT 8, "MS Shell Dlg"
{
}

94
FOCUS_TEST_DIALOG DIALOG 0, 0, 60, 30
95 96 97 98 99 100
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_CONTROL
CAPTION "Test dialog"
FONT 8, "MS Shell Dlg"
{
  EDITTEXT                200,4,4,50,14
}
101

102 103 104 105 106 107 108 109
FOCUS_TEST_DIALOG_2 DIALOG 0, 0, 60, 30
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Test dialog"
FONT 8, "MS Shell Dlg"
{
  LTEXT "Hello world",    200,4,4,50,14
}

110
IDD_DIALOG DIALOG  0, 0, 186, 95
111 112 113 114 115 116 117 118
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Sans Serif"
BEGIN
    DEFPUSHBUTTON   "OK",IDOK,129,7,50,14
    PUSHBUTTON      "Cancel",IDCANCEL,129,24,50,14
END

119
TEST_EMPTY_DIALOG DIALOG  0, 0, 186, 95
120 121 122 123 124 125
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Sans Serif"
BEGIN
END

126
MULTI_EDIT_DIALOG DIALOG 0, 0, 160, 75
127 128 129 130
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
CAPTION "Multiple Edit Test"
FONT 8, "MS Shell Dlg"
{
131
    EDITTEXT 1000, 5, 5, 150, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_MULTILINE | ES_WANTRETURN
132 133 134 135
    EDITTEXT 1001, 5, 25, 150, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
    EDITTEXT 1002, 5, 45, 150, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
}

136
EDIT_DIALOG DIALOG 0, 0, 160, 80
137 138 139 140
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
CAPTION "Edit Test"
FONT 8, "MS Shell Dlg"
{
141
    PUSHBUTTON "OK", IDOK, 20, 60, 50, 14,  WS_CHILD | WS_VISIBLE | WS_TABSTOP
142 143 144 145
    PUSHBUTTON "Cancel", IDCANCEL, 100, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
    EDITTEXT 1000, 5, 5, 150, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_MULTILINE | WS_VSCROLL | ES_AUTOVSCROLL
}

146
EDIT_SINGLELINE_DIALOG DIALOG 0, 0, 160, 80
147 148 149 150
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
CAPTION "Edit Test"
FONT 8, "MS Shell Dlg"
{
151
    PUSHBUTTON "OK", IDOK, 20, 60, 50, 14,  WS_CHILD | WS_VISIBLE | WS_TABSTOP
152 153 154 155
    PUSHBUTTON "Cancel", IDCANCEL, 100, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
    EDITTEXT 1000, 5, 5, 150, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | ES_AUTOVSCROLL
}

156
EDIT_SINGLELINE_WANTRETURN_DIALOG DIALOG 0, 0, 160, 80
157 158 159 160
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
CAPTION "Edit Test"
FONT 8, "MS Shell Dlg"
{
161
    PUSHBUTTON "OK", IDOK, 20, 60, 50, 14,  WS_CHILD | WS_VISIBLE | WS_TABSTOP
162 163 164 165
    PUSHBUTTON "Cancel", IDCANCEL, 100, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
    EDITTEXT 1000, 5, 5, 150, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | ES_AUTOVSCROLL | ES_WANTRETURN
}

166
EDIT_WANTRETURN_DIALOG DIALOG 0, 0, 160, 80
167 168 169 170
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
CAPTION "Edit Test"
FONT 8, "MS Shell Dlg"
{
171
    PUSHBUTTON "OK", IDOK, 20, 60, 50, 14,  WS_CHILD | WS_VISIBLE | WS_TABSTOP
172 173 174 175
    PUSHBUTTON "Cancel", IDCANCEL, 100, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
    EDITTEXT 1000, 5, 5, 150, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_MULTILINE | WS_VSCROLL | ES_AUTOVSCROLL | ES_WANTRETURN
}

176
EDIT_READONLY_DIALOG DIALOG 0, 0, 160, 80
177
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
178
CAPTION "Edit Readonly Test"
179 180
FONT 8, "MS Shell Dlg"
{
181
    PUSHBUTTON "OK", IDOK, 20, 60, 50, 14,  WS_CHILD | WS_VISIBLE | WS_TABSTOP
182 183 184 185
    PUSHBUTTON "Cancel", IDCANCEL, 100, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
    EDITTEXT 1000, 5, 5, 150, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_MULTILINE | WS_VSCROLL | ES_AUTOVSCROLL | ES_READONLY
}

186
/* @makedep: test_mono.bmp */
187
100 BITMAP test_mono.bmp
188 189 190 191 192

1 MENU
{
    POPUP "&File"
    {
193 194 195 196
        POPUP "&New..."
        {
            MENUITEM "&New file", 100
        }
197 198 199 200 201
        MENUITEM "&Open", 101
        MENUITEM "&Save", 102
        MENUITEM SEPARATOR
        MENUITEM "E&xit", 103
    }
202
    POPUP "&Edit"
203 204 205 206 207 208 209 210
    {
        MENUITEM "&Undo", 200
        MENUITEM SEPARATOR
        MENUITEM "Cu&t", 201
        MENUITEM "&Copy", 202
        MENUITEM "&Paste", 203
        MENUITEM "&Delete", 204
    }
211
    MENUITEM "&Quit", 300
212
}