Author: tretiakov
Date: Fri Feb 23 11:56:32 2007
New Revision: 25889
URL:
http://svn.reactos.org/svn/reactos?rev=25889&view=rev
Log:
Update testapp
Modified:
trunk/reactos/base/applications/testsets/user32/kbdlayout/ (props changed)
trunk/reactos/base/applications/testsets/user32/kbdlayout/kbdlayout.c
trunk/reactos/base/applications/testsets/user32/kbdlayout/kbdlayout.rc
trunk/reactos/base/applications/testsets/user32/kbdlayout/resource.h
Propchange: trunk/reactos/base/applications/testsets/user32/kbdlayout/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Feb 23 11:56:32 2007
@@ -3,3 +3,5 @@
*.plg
*.opt
*.ncb
+*.aps
+
Modified: trunk/reactos/base/applications/testsets/user32/kbdlayout/kbdlayout.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/testsets…
==============================================================================
--- trunk/reactos/base/applications/testsets/user32/kbdlayout/kbdlayout.c (original)
+++ trunk/reactos/base/applications/testsets/user32/kbdlayout/kbdlayout.c Fri Feb 23
11:56:32 2007
@@ -25,20 +25,28 @@
WCHAR WndName[25];
} WND_DATA;
-INT WINAPI WinMain(HINSTANCE hInstance,
- HINSTANCE hPrevInstance,
- LPSTR lpCmdLine,
- int nCmdShow)
-{
-
-
- hInst = hInstance;
+DWORD WINAPI ThreadProc(LPVOID lpParam)
+{
DialogBoxParam(hInst,
MAKEINTRESOURCE(IDD_MAINDIALOG),
NULL,
(DLGPROC)MainDialogProc,
(LPARAM)NULL);
+
+ return 0;
+}
+
+INT WINAPI WinMain(HINSTANCE hInstance,
+ HINSTANCE hPrevInstance,
+ LPSTR lpCmdLine,
+ int nCmdShow)
+{
+
+
+ hInst = hInstance;
+
+ ThreadProc(0);
return 0;
}
@@ -148,11 +156,11 @@
if(IsDlgButtonChecked(hDlg, IDC_KLF_REORDER))
ret |= KLF_REORDER;
-/* if(IsDlgButtonChecked(hDlg, IDC_KLF_RESET))
+ if(IsDlgButtonChecked(hDlg, IDC_KLF_RESET))
ret |= KLF_RESET;
if(IsDlgButtonChecked(hDlg, IDC_KLF_SHIFTLOCK))
- ret |= KLF_SHIFTLOCK;*/
+ ret |= KLF_SHIFTLOCK;
if(IsDlgButtonChecked(hDlg, IDC_KLF_SETFORPROCESS))
ret |= KLF_SETFORPROCESS;
@@ -201,14 +209,6 @@
if(IsDlgButtonChecked(hDlg, IDC_FROMLIST))
return GetSelectedLayout(hDlg);
- else if(IsDlgButtonChecked(hDlg, IDC_FROMEDIT))
- {
- WCHAR buf[25];
- ULONG kl;
- GetWindowText(GetDlgItem(hDlg, IDC_HANDLE), buf, 25);
- swscanf(buf, L"%x", &kl);
- return (HKL) kl;
- }
else if(IsDlgButtonChecked(hDlg, IDC_HKL_NEXT))
return (HKL)HKL_NEXT;
@@ -232,21 +232,24 @@
{
case WM_INITDIALOG:
{
+ WCHAR Buf[255];
UpdateData(hDlg);
hMainDlg = hDlg;
SubclassWnd(GetDlgItem(hDlg, IDC_LIST), L"List");
SubclassWnd(GetDlgItem(hDlg, IDC_EDIT1), L"Edit1");
- SubclassWnd(GetDlgItem(hDlg, IDC_EDIT2), L"Edit2");
SubclassWnd(GetDlgItem(hDlg, IDC_KLID), L"Klid");
- SubclassWnd(GetDlgItem(hDlg, IDC_HANDLE), L"Handle");
SubclassWnd(GetDlgItem(hDlg, ID_CANCEL), L"CancelB");
SubclassWnd(GetDlgItem(hDlg, IDC_ACTIVATE), L"ActivateB");
SubclassWnd(GetDlgItem(hDlg, IDC_REFRESH), L"RefreshB");
SubclassWnd(GetDlgItem(hDlg, IDC_UNLOAD), L"UnloadB");
+ SubclassWnd(GetDlgItem(hDlg, IDC_LOAD), L"LoadB");
CheckRadioButton(hDlg, IDC_FROMLIST, IDC_FROMEDIT, IDC_FROMLIST);
SetWindowText(GetDlgItem(hDlg, IDC_KLID), L"00000419");
+
+ swprintf(Buf, L"Current thread id: %d", GetCurrentThreadId());
+ SetWindowText(GetDlgItem(hDlg, IDC_CURTHREAD), Buf);
return 0;
} /* WM_INITDIALOG */
@@ -308,6 +311,15 @@
break;
}
+ case IDC_NEWTHREAD:
+ {
+ if(!CreateThread(NULL, 0, ThreadProc, NULL, 0, NULL))
+ {
+ FormatBox(hDlg, MB_ICONERROR, L"Error!",
+ L"Can not create thread (%d).", GetLastError());
+ }
+ }
+
case IDC_LIST:
{
if(HIWORD(wParam) == LBN_SELCHANGE)
Modified: trunk/reactos/base/applications/testsets/user32/kbdlayout/kbdlayout.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/testsets…
==============================================================================
--- trunk/reactos/base/applications/testsets/user32/kbdlayout/kbdlayout.rc (original)
+++ trunk/reactos/base/applications/testsets/user32/kbdlayout/kbdlayout.rc Fri Feb 23
11:56:32 2007
@@ -26,56 +26,55 @@
// Dialog
//
-IDD_MAINDIALOG DIALOG DISCARDABLE 0, 0, 403, 223
-STYLE DS_CENTER | WS_MINIMIZEBOX | WS_CAPTION | WS_SYSMENU
+IDD_MAINDIALOG DIALOG DISCARDABLE 0, 0, 327, 194
+STYLE DS_MODALFRAME | DS_CENTER | WS_CAPTION | WS_SYSMENU
CAPTION "Keyboard layout test"
FONT 8, "MS Sans Serif"
BEGIN
- PUSHBUTTON "Exit",ID_CANCEL,138,202,121,14
- EDITTEXT IDC_EDIT1,7,140,195,58,ES_MULTILINE | ES_AUTOHSCROLL
- LISTBOX IDC_LIST,185,17,101,87,LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
+ PUSHBUTTON "Close",ID_CANCEL,215,172,105,14
+ EDITTEXT IDC_EDIT1,7,140,199,47,ES_MULTILINE | ES_AUTOHSCROLL
+ LISTBOX IDC_LIST,124,17,84,89,LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
WS_TABSTOP
- LTEXT "Loaded layouts",IDC_STATIC,190,7,49,8
- LTEXT "Active layout:",IDC_ACTIVE,7,127,173,10,SS_SUNKEN
- EDITTEXT IDC_EDIT2,206,140,190,58,ES_MULTILINE | ES_AUTOHSCROLL
- PUSHBUTTON "Unload",IDC_UNLOAD,186,105,48,14
- PUSHBUTTON "Activate",IDC_ACTIVATE,237,121,47,14
- GROUPBOX "Activate Flags",IDC_STATIC,293,7,103,67
+ LTEXT "Loaded layouts",IDC_STATIC,128,7,49,8
+ LTEXT "Active layout:",IDC_ACTIVE,7,127,114,10,SS_SUNKEN
+ PUSHBUTTON "Unload",IDC_UNLOAD,124,109,41,14
+ PUSHBUTTON "Activate",IDC_ACTIVATE,166,109,41,14
+ GROUPBOX "Activate Flags",IDC_STATIC,215,7,103,67
CONTROL
"KLF_REORDER",IDC_KLF_REORDER,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,299,22,69,10
+ WS_TABSTOP,221,22,69,10
CONTROL
"KLF_RESET",IDC_KLF_RESET,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,299,34,66,12
+ WS_TABSTOP,221,34,66,12
CONTROL
"KLF_SETFORPROCESS",IDC_KLF_SETFORPROCESS,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,299,48,95,10
+ BS_AUTOCHECKBOX | WS_TABSTOP,221,48,95,10
CONTROL "KLF_SHIFTLOCK",IDC_KLF_SHIFTLOCK,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,299,60,72,10
- GROUPBOX "Activate layout",IDC_STATIC,294,77,101,60
+ BS_AUTOCHECKBOX | WS_TABSTOP,221,60,72,10
+ GROUPBOX "Activate layout",IDC_STATIC,216,77,103,50
CONTROL "From
list",IDC_FROMLIST,"Button",BS_AUTORADIOBUTTON |
- WS_GROUP,298,90,41,10
- CONTROL
"HKL_NEXT",IDC_HKL_NEXT,"Button",BS_AUTORADIOBUTTON,298,
+ WS_GROUP,220,90,41,10
+ CONTROL
"HKL_NEXT",IDC_HKL_NEXT,"Button",BS_AUTORADIOBUTTON,220,
101,53,10
- CONTROL
"HKL_PREV",IDC_HKL_PREV,"Button",BS_AUTORADIOBUTTON,298,
+ CONTROL
"HKL_PREV",IDC_HKL_PREV,"Button",BS_AUTORADIOBUTTON,220,
112,53,10
- CONTROL "From
edit",IDC_FROMEDIT,"Button",BS_AUTORADIOBUTTON,298,
- 124,45,10
- GROUPBOX "Load layout",IDC_STATIC,7,7,173,118
+ GROUPBOX "Load layout",IDC_STATIC,7,7,113,118
CONTROL
"KLF_ACTIVATE",IDL_KLF_ACTIVATE,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,15,42,67,10
+ WS_TABSTOP,14,44,67,10
CONTROL "KLF_NOTELLSHELL",IDL_KLF_NOTELLSHELL,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,15,55,83,10
- LTEXT "pwszKLID:",IDC_STATIC,15,22,35,8
- EDITTEXT IDC_KLID,53,21,64,14,ES_AUTOHSCROLL | ES_NUMBER
+ BS_AUTOCHECKBOX | WS_TABSTOP,14,57,83,10
+ LTEXT "pwszKLID:",IDC_STATIC,14,17,35,8
+ EDITTEXT IDC_KLID,14,27,54,14,ES_AUTOHSCROLL
CONTROL
"KLF_REORDER",IDL_KLF_REORDER,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,15,68,69,10
+ WS_TABSTOP,14,71,69,10
CONTROL "KLF_REPLACELANG",IDL_KLF_REPLACELANG,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,15,81,85,10
+ BS_AUTOCHECKBOX | WS_TABSTOP,14,84,85,10
CONTROL
"KLF_SUBSTITUTE_OK",IDL_KLF_SUBSTITUTE_OK,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,15,94,92,10
+ BS_AUTOCHECKBOX | WS_TABSTOP,14,97,92,10
CONTROL
"KLF_SETFORPROCESS",IDL_KLF_SETFORPROCESS,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,15,107,95,10
- PUSHBUTTON "Load",IDC_LOAD,125,21,50,14
- PUSHBUTTON "Refresh",IDC_REFRESH,237,106,48,14
- EDITTEXT IDC_HANDLE,185,122,49,14,ES_AUTOHSCROLL
+ BS_AUTOCHECKBOX | WS_TABSTOP,14,110,95,10
+ PUSHBUTTON "Load",IDC_LOAD,71,27,46,14
+ PUSHBUTTON "Refresh",IDC_REFRESH,124,124,83,12
+ GROUPBOX "Multithreading",IDC_STATIC,216,130,104,39
+ LTEXT "Current thread ID:",IDC_CURTHREAD,219,141,93,8
+ PUSHBUTTON "Create new thread",IDC_NEWTHREAD,234,152,71,12
END
@@ -90,9 +89,9 @@
IDD_MAINDIALOG, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 396
+ RIGHTMARGIN, 320
TOPMARGIN, 7
- BOTTOMMARGIN, 216
+ BOTTOMMARGIN, 187
END
END
#endif // APSTUDIO_INVOKED
@@ -123,7 +122,6 @@
#endif // APSTUDIO_INVOKED
-
#endif // Russian resources
/////////////////////////////////////////////////////////////////////////////
Modified: trunk/reactos/base/applications/testsets/user32/kbdlayout/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/testsets…
==============================================================================
--- trunk/reactos/base/applications/testsets/user32/kbdlayout/resource.h (original)
+++ trunk/reactos/base/applications/testsets/user32/kbdlayout/resource.h Fri Feb 23
11:56:32 2007
@@ -1,6 +1,6 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
-// Used by lab17.rc
+// Used by kbdlayout.rc
//
#define IDD_MAINDIALOG 101
#define ID_CANCEL 1000
@@ -29,6 +29,8 @@
#define IDC_LOAD 1043
#define IDC_REFRESH 1044
#define IDC_HANDLE 1046
+#define IDC_CURTHREAD 1049
+#define IDC_NEWTHREAD 1050
// Next default values for new objects
//
@@ -37,7 +39,7 @@
#define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 105
#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1049
+#define _APS_NEXT_CONTROL_VALUE 1051
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif