Author: tretiakov
Date: Wed Feb 28 16:25:50 2007
New Revision: 25924
URL:
http://svn.reactos.org/svn/reactos?rev=25924&view=rev
Log:
Update testapp
Modified:
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
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 Wed Feb 28
16:25:50 2007
@@ -80,7 +80,7 @@
int n, i,j;
GetKeyboardLayoutName(buf);
- swprintf(buf2, L"Active layout: %s (%x)", buf, GetKeyboardLayout(0));
+ swprintf(buf2, L"Active: %s (%x)", buf, GetKeyboardLayout(0));
SetWindowText(GetDlgItem(hDlg, IDC_ACTIVE), buf2);
hList = GetDlgItem(hDlg, IDC_LIST);
@@ -194,6 +194,18 @@
return ret;
}
+UINT GetDelayMilliseconds(HWND hDlg)
+{
+ WCHAR Buf[255];
+ UINT ret;
+
+ GetWindowText(GetDlgItem(hDlg, IDC_DELAY), Buf, sizeof(Buf));
+
+ swscanf(Buf, L"%d", &ret);
+
+ return ret*1000;
+}
+
HKL GetSelectedLayout(HWND hDlg)
{
int n;
@@ -251,6 +263,8 @@
swprintf(Buf, L"Current thread id: %d", GetCurrentThreadId());
SetWindowText(GetDlgItem(hDlg, IDC_CURTHREAD), Buf);
+ SetWindowText(GetDlgItem(hDlg, IDC_DELAY), L"0");
+
return 0;
} /* WM_INITDIALOG */
@@ -268,6 +282,7 @@
{
if((hKl = GetActivateHandle(hDlg)) != INVALID_HANDLE_VALUE)
{
+ Sleep(GetDelayMilliseconds(hDlg));
if(!(hKl = ActivateKeyboardLayout(hKl, GetActivateFlags(hDlg))))
FormatBox(hDlg, MB_ICONERROR, L"Error",
L"ActivateKeyboardLayout() failed. %d", GetLastError());
@@ -283,6 +298,7 @@
{
if((hKl = GetSelectedLayout(hDlg)) != INVALID_HANDLE_VALUE)
{
+ Sleep(GetDelayMilliseconds(hDlg));
if(!UnloadKeyboardLayout(hKl))
FormatBox(hDlg, MB_ICONERROR, L"Error",
L"UnloadKeyboardLayout() failed. %d",
@@ -297,6 +313,7 @@
{
WCHAR buf[255];
GetWindowText(GetDlgItem(hDlg, IDC_KLID), buf, sizeof(buf));
+ Sleep(GetDelayMilliseconds(hDlg));
if(!LoadKeyboardLayout(buf, GetLoadFlags(hDlg)))
FormatBox(hDlg, MB_ICONERROR, L"Error",
L"LoadKeyboardLayout() failed. %d",
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 Wed Feb 28
16:25:50 2007
@@ -33,10 +33,10 @@
BEGIN
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 |
+ LISTBOX IDC_LIST,124,60,84,46,LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
WS_TABSTOP
- LTEXT "Loaded layouts",IDC_STATIC,128,7,49,8
- LTEXT "Active layout:",IDC_ACTIVE,7,127,114,10,SS_SUNKEN
+ LTEXT "Loaded layouts",IDC_STATIC,124,50,49,8
+ LTEXT "Active:",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
@@ -75,6 +75,9 @@
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
+ GROUPBOX "Load\\Activate delay",IDC_STATIC,124,7,85,40
+ LTEXT "Delay (seconds):",IDC_STATIC,130,17,75,8
+ EDITTEXT IDC_DELAY,128,29,59,14,ES_AUTOHSCROLL
END
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 Wed Feb 28
16:25:50 2007
@@ -8,6 +8,7 @@
#define IDC_LIST 1022
#define IDC_ACTIVE 1023
#define IDC_EDIT2 1024
+#define IDC_DELAY 1024
#define IDC_UNLOAD 1025
#define IDC_ACTIVATE 1026
#define IDC_KLF_REORDER 1027