2004-01-09 01:36:51 +01:00
|
|
|
/* 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
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2004-01-09 01:36:51 +01:00
|
|
|
*/
|
|
|
|
|
2004-05-18 22:44:23 +02:00
|
|
|
#include "windef.h"
|
|
|
|
#include "winuser.h"
|
|
|
|
|
2004-10-06 01:45:35 +02:00
|
|
|
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' */
|
2005-02-21 19:33:27 +01:00
|
|
|
78, 1004, VIRTKEY, CONTROL, SHIFT /* Ctrl+Shift+'N' */
|
|
|
|
78, 1005, VIRTKEY, CONTROL, ALT, SHIFT /* Ctrl+Alt+Shift+'N' */
|
2004-10-06 01:45:35 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
STRINGTABLE
|
|
|
|
{
|
|
|
|
0 "String resource"
|
2006-09-21 20:47:20 +02:00
|
|
|
1 "Another string resource"
|
2008-03-02 18:01:55 +01:00
|
|
|
2 L"This is a wide string resource"
|
2006-09-21 20:47:20 +02:00
|
|
|
65534 "Test high id"
|
2004-01-09 01:36:51 +01:00
|
|
|
}
|
2004-05-18 22:44:23 +02:00
|
|
|
|
2011-11-15 08:27:13 +01:00
|
|
|
/* 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
|
|
|
|
}
|
|
|
|
|
2010-07-21 23:56:30 +02:00
|
|
|
TEST_DIALOG DIALOG 0, 0, 60, 30
|
2004-05-18 22:44:23 +02:00
|
|
|
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
|
|
|
CAPTION "Test dialog"
|
2004-08-24 20:33:01 +02:00
|
|
|
FONT 8, "MS Shell Dlg"
|
2004-10-06 01:45:35 +02:00
|
|
|
{
|
2004-05-18 22:44:23 +02:00
|
|
|
DEFPUSHBUTTON "OK", IDOK,4,4,50,14, WS_TABSTOP | WS_GROUP
|
2004-10-06 01:45:35 +02:00
|
|
|
}
|
2004-07-14 02:52:55 +02:00
|
|
|
|
2004-09-10 23:14:43 +02:00
|
|
|
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"
|
2004-10-06 01:45:35 +02:00
|
|
|
{
|
2004-09-10 23:14:43 +02:00
|
|
|
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
|
2004-10-06 01:45:35 +02:00
|
|
|
}
|
2004-09-10 23:14:43 +02:00
|
|
|
|
2018-11-27 07:11:04 +01:00
|
|
|
AUTORADIO_TEST_DIALOG_1 DIALOGEX 0, 0, 200, 200
|
|
|
|
STYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
|
|
|
CAPTION "Radio Button Test Dialog"
|
|
|
|
FONT 8, "MS Shell Dlg"
|
|
|
|
{
|
|
|
|
CONTROL "Radio1",501,"my_button_class",WS_VISIBLE | WS_CHILD | WS_GROUP | BS_AUTORADIOBUTTON | BS_NOTIFY | WS_TABSTOP,10,10,70,18
|
|
|
|
CONTROL "Radio3",503,"my_button_class",WS_VISIBLE | WS_CHILD | BS_RADIOBUTTON | BS_NOTIFY | WS_TABSTOP,10,35,70,18
|
|
|
|
CONTROL "Text",504,"my_button_class",WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON | BS_NOTIFY | WS_TABSTOP,10,60,70,18
|
|
|
|
CONTROL "Radio2",502,"my_button_class",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_NOTIFY | WS_TABSTOP,10,85,70,18
|
|
|
|
}
|
|
|
|
|
2018-11-27 07:11:13 +01:00
|
|
|
AUTORADIO_TEST_DIALOG_2 DIALOGEX 0, 0, 200, 200
|
|
|
|
STYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
|
|
|
CAPTION "Radio Button Test Dialog"
|
|
|
|
FONT 8, "MS Shell Dlg"
|
|
|
|
{
|
|
|
|
CONTROL "Radio1",501,"my_button_class",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_NOTIFY | WS_TABSTOP,10,10,70,18
|
|
|
|
CONTROL "Radio3",503,"my_button_class",WS_VISIBLE | WS_CHILD | BS_RADIOBUTTON | BS_NOTIFY,10,35,70,18
|
|
|
|
CONTROL "Text",504,"my_button_class",WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON | BS_NOTIFY,10,60,70,18
|
|
|
|
CONTROL "Radio2",502,"my_button_class",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_NOTIFY,10,85,70,18
|
|
|
|
}
|
|
|
|
|
2010-07-21 23:56:30 +02:00
|
|
|
CLASS_TEST_DIALOG DIALOG 0, 0, 91, 28
|
2004-07-14 02:52:55 +02:00
|
|
|
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
|
|
|
CAPTION "CreateDialogParams Test"
|
|
|
|
CLASS "TestDialog"
|
2005-02-21 19:33:27 +01:00
|
|
|
FONT 8, "MS Shell Dlg"
|
2004-10-06 01:45:35 +02:00
|
|
|
{
|
|
|
|
}
|
2004-12-21 17:01:50 +01:00
|
|
|
|
2010-07-21 23:56:30 +02:00
|
|
|
CLASS_TEST_DIALOG_2 DIALOG 0, 0, 100, 100
|
2007-05-08 10:47:41 +02:00
|
|
|
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
|
|
|
CAPTION "CreateDialogParams Test"
|
|
|
|
CLASS "MyDialogClass"
|
|
|
|
FONT 8, "MS Shell Dlg"
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2010-07-21 23:56:30 +02:00
|
|
|
FOCUS_TEST_DIALOG DIALOG 0, 0, 60, 30
|
2004-12-21 17:01:50 +01:00
|
|
|
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
|
|
|
|
}
|
2006-06-07 14:03:22 +02:00
|
|
|
|
2011-12-02 08:37:01 +01:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2016-02-16 14:49:10 +01:00
|
|
|
FOCUS_TEST_DIALOG_3 DIALOG 0, 0, 60, 30
|
|
|
|
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
|
|
|
CAPTION "Test dialog"
|
|
|
|
FONT 8, "MS Shell Dlg"
|
|
|
|
{
|
|
|
|
EDITTEXT 200,4,4,50,14
|
|
|
|
}
|
|
|
|
|
2016-02-18 14:18:56 +01:00
|
|
|
FOCUS_TEST_DIALOG_4 DIALOG 0, 0, 60, 30
|
|
|
|
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
|
|
|
CAPTION "Test dialog"
|
|
|
|
CLASS "MyDialogClass"
|
|
|
|
FONT 8, "MS Shell Dlg"
|
|
|
|
{
|
|
|
|
EDITTEXT 200,4,4,50,14
|
|
|
|
}
|
|
|
|
|
2017-08-18 13:41:57 +02:00
|
|
|
TEST_DIALOG_INVALID_CLASS DIALOG 0, 0, 60, 30
|
|
|
|
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
|
|
|
{
|
|
|
|
CONTROL "",1,"wine invalid class",WS_CHILD,0,0,40,10
|
|
|
|
}
|
|
|
|
|
2010-07-21 23:56:30 +02:00
|
|
|
IDD_DIALOG DIALOG 0, 0, 186, 95
|
2007-02-14 21:32:35 +01:00
|
|
|
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
|
|
|
|
|
2010-07-21 23:56:30 +02:00
|
|
|
TEST_EMPTY_DIALOG DIALOG 0, 0, 186, 95
|
2009-08-25 16:19:24 +02:00
|
|
|
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
|
|
|
CAPTION "Dialog"
|
|
|
|
FONT 8, "MS Sans Serif"
|
|
|
|
BEGIN
|
|
|
|
END
|
|
|
|
|
2010-07-21 23:56:30 +02:00
|
|
|
MULTI_EDIT_DIALOG DIALOG 0, 0, 160, 75
|
2008-04-02 20:04:23 +02:00
|
|
|
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
|
|
|
|
CAPTION "Multiple Edit Test"
|
|
|
|
FONT 8, "MS Shell Dlg"
|
|
|
|
{
|
2008-04-02 20:33:19 +02:00
|
|
|
EDITTEXT 1000, 5, 5, 150, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_MULTILINE | ES_WANTRETURN
|
2008-04-02 20:04:23 +02:00
|
|
|
EDITTEXT 1001, 5, 25, 150, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
|
|
|
EDITTEXT 1002, 5, 45, 150, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
|
|
|
}
|
|
|
|
|
2010-07-21 23:56:30 +02:00
|
|
|
EDIT_DIALOG DIALOG 0, 0, 160, 80
|
2008-03-27 20:17:23 +01:00
|
|
|
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
|
|
|
|
CAPTION "Edit Test"
|
|
|
|
FONT 8, "MS Shell Dlg"
|
|
|
|
{
|
2011-06-15 11:32:33 +02:00
|
|
|
PUSHBUTTON "OK", IDOK, 20, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
2008-03-27 20:17:23 +01:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2010-07-21 23:56:30 +02:00
|
|
|
EDIT_SINGLELINE_DIALOG DIALOG 0, 0, 160, 80
|
2008-04-07 22:32:36 +02:00
|
|
|
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
|
|
|
|
CAPTION "Edit Test"
|
|
|
|
FONT 8, "MS Shell Dlg"
|
|
|
|
{
|
2011-06-15 11:32:33 +02:00
|
|
|
PUSHBUTTON "OK", IDOK, 20, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
2008-04-07 22:32:36 +02:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2010-07-21 23:56:30 +02:00
|
|
|
EDIT_SINGLELINE_WANTRETURN_DIALOG DIALOG 0, 0, 160, 80
|
2008-04-07 22:32:36 +02:00
|
|
|
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
|
|
|
|
CAPTION "Edit Test"
|
|
|
|
FONT 8, "MS Shell Dlg"
|
|
|
|
{
|
2011-06-15 11:32:33 +02:00
|
|
|
PUSHBUTTON "OK", IDOK, 20, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
2008-04-07 22:32:36 +02:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2010-07-21 23:56:30 +02:00
|
|
|
EDIT_WANTRETURN_DIALOG DIALOG 0, 0, 160, 80
|
2008-04-07 22:32:20 +02:00
|
|
|
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
|
|
|
|
CAPTION "Edit Test"
|
|
|
|
FONT 8, "MS Shell Dlg"
|
|
|
|
{
|
2011-06-15 11:32:33 +02:00
|
|
|
PUSHBUTTON "OK", IDOK, 20, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
2008-04-07 22:32:20 +02:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2010-07-21 23:56:30 +02:00
|
|
|
EDIT_READONLY_DIALOG DIALOG 0, 0, 160, 80
|
2008-03-26 03:09:38 +01:00
|
|
|
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
|
2008-03-27 19:48:44 +01:00
|
|
|
CAPTION "Edit Readonly Test"
|
2008-03-26 03:09:38 +01:00
|
|
|
FONT 8, "MS Shell Dlg"
|
|
|
|
{
|
2011-06-15 11:32:33 +02:00
|
|
|
PUSHBUTTON "OK", IDOK, 20, 60, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
|
2008-03-26 03:09:38 +01:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2018-10-01 08:47:37 +02:00
|
|
|
CUSTOM_TEST_DIALOG DIALOGEX 6, 15, 207, 111
|
|
|
|
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
|
|
|
CAPTION "Custom Test Dialog"
|
|
|
|
FONT 8, "MS Sans Serif"
|
|
|
|
{
|
|
|
|
CONTROL "evenlengthtext", -1, "TESTCONTROL", WS_CHILD|WS_VISIBLE|WS_BORDER|WS_TABSTOP, 10,10,100,50 { 1,2,3,4,5 }
|
|
|
|
CONTROL "oddlengthtext", -1, "TESTCONTROL", WS_CHILD|WS_VISIBLE|WS_BORDER|WS_TABSTOP, 10,60,100,50 { 1,2,3,4,5 }
|
|
|
|
}
|
|
|
|
|
2019-01-24 09:52:01 +01:00
|
|
|
GETDLGITEM_TEST_DIALOG DIALOGEX 6, 15, 207, 111
|
|
|
|
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
|
|
|
CAPTION "Test Dialog"
|
|
|
|
FONT 8, "MS Shell Dlg"
|
|
|
|
{
|
|
|
|
LTEXT "Text1",-1,10,10,100,50
|
|
|
|
LTEXT "Text2",-2,10,10,100,50
|
|
|
|
}
|
|
|
|
|
2007-09-17 16:12:03 +02:00
|
|
|
/* @makedep: test_mono.bmp */
|
2006-06-07 14:03:22 +02:00
|
|
|
100 BITMAP test_mono.bmp
|
2007-05-14 16:46:32 +02:00
|
|
|
|
|
|
|
1 MENU
|
|
|
|
{
|
|
|
|
POPUP "&File"
|
|
|
|
{
|
2008-06-18 05:34:01 +02:00
|
|
|
POPUP "&New..."
|
|
|
|
{
|
|
|
|
MENUITEM "&New file", 100
|
|
|
|
}
|
2007-05-14 16:46:32 +02:00
|
|
|
MENUITEM "&Open", 101
|
|
|
|
MENUITEM "&Save", 102
|
|
|
|
MENUITEM SEPARATOR
|
|
|
|
MENUITEM "E&xit", 103
|
|
|
|
}
|
2008-06-18 05:34:01 +02:00
|
|
|
POPUP "&Edit"
|
2007-05-14 16:46:32 +02:00
|
|
|
{
|
|
|
|
MENUITEM "&Undo", 200
|
|
|
|
MENUITEM SEPARATOR
|
|
|
|
MENUITEM "Cu&t", 201
|
|
|
|
MENUITEM "&Copy", 202
|
|
|
|
MENUITEM "&Paste", 203
|
|
|
|
MENUITEM "&Delete", 204
|
|
|
|
}
|
2011-04-06 13:24:57 +02:00
|
|
|
MENUITEM "&Quit", 300
|
2007-05-14 16:46:32 +02:00
|
|
|
}
|