Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
08a4d2af
Commit
08a4d2af
authored
Apr 02, 2008
by
Lei Zhang
Committed by
Alexandre Julliard
Apr 03, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Dialog should ignore WM_KEYDOWN messages if it gets DLGC_WANTCHARS.
parent
1d1f1373
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
114 additions
and
1 deletion
+114
-1
dialog.c
dlls/user32/dialog.c
+1
-1
edit.c
dlls/user32/tests/edit.c
+103
-0
resource.rc
dlls/user32/tests/resource.rc
+10
-0
No files found.
dlls/user32/dialog.c
View file @
08a4d2af
...
...
@@ -1094,7 +1094,7 @@ BOOL WINAPI IsDialogMessageW( HWND hwndDlg, LPMSG msg )
{
case
WM_KEYDOWN
:
dlgCode
=
SendMessageW
(
msg
->
hwnd
,
WM_GETDLGCODE
,
msg
->
wParam
,
(
LPARAM
)
msg
);
if
(
dlgCode
&
DLGC_WANTMESSAGE
)
break
;
if
(
dlgCode
&
(
DLGC_WANTCHARS
|
DLGC_WANTMESSAGE
)
)
break
;
switch
(
msg
->
wParam
)
{
...
...
dlls/user32/tests/edit.c
View file @
08a4d2af
...
...
@@ -37,6 +37,95 @@ struct edit_notify {
static
struct
edit_notify
notifications
;
static
INT_PTR
CALLBACK
multi_edit_dialog_proc
(
HWND
hdlg
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
switch
(
msg
)
{
case
WM_INITDIALOG
:
{
HWND
hedit
=
GetDlgItem
(
hdlg
,
1000
);
SetFocus
(
hedit
);
switch
(
lparam
)
{
/* test cases related to bug 12319 */
case
0
:
PostMessage
(
hedit
,
WM_KEYDOWN
,
VK_TAB
,
0xf0001
);
PostMessage
(
hdlg
,
WM_USER
,
0xdeadbeef
,
0
);
break
;
case
1
:
PostMessage
(
hedit
,
WM_CHAR
,
VK_TAB
,
0xf0001
);
PostMessage
(
hdlg
,
WM_USER
,
0xdeadbeef
,
0
);
break
;
case
2
:
PostMessage
(
hedit
,
WM_KEYDOWN
,
VK_TAB
,
0xf0001
);
PostMessage
(
hedit
,
WM_CHAR
,
VK_TAB
,
0xf0001
);
PostMessage
(
hdlg
,
WM_USER
,
0xdeadbeef
,
0
);
break
;
default:
break
;
}
break
;
}
case
WM_COMMAND
:
if
(
HIWORD
(
wparam
)
!=
BN_CLICKED
)
break
;
switch
(
LOWORD
(
wparam
))
{
case
IDOK
:
EndDialog
(
hdlg
,
111
);
break
;
case
IDCANCEL
:
EndDialog
(
hdlg
,
222
);
break
;
default:
break
;
}
break
;
case
WM_USER
:
{
HWND
hfocus
=
GetFocus
();
HWND
hedit
=
GetDlgItem
(
hdlg
,
1000
);
HWND
hedit2
=
GetDlgItem
(
hdlg
,
1001
);
HWND
hedit3
=
GetDlgItem
(
hdlg
,
1002
);
if
(
wparam
!=
0xdeadbeef
)
break
;
switch
(
lparam
)
{
case
0
:
if
(
hfocus
==
hedit
)
EndDialog
(
hdlg
,
1111
);
else
if
(
hfocus
==
hedit2
)
EndDialog
(
hdlg
,
2222
);
else
if
(
hfocus
==
hedit3
)
EndDialog
(
hdlg
,
3333
);
else
EndDialog
(
hdlg
,
4444
);
break
;
default:
EndDialog
(
hdlg
,
5555
);
}
break
;
}
case
WM_CLOSE
:
EndDialog
(
hdlg
,
333
);
break
;
default:
break
;
}
return
FALSE
;
}
static
INT_PTR
CALLBACK
edit_dialog_proc
(
HWND
hdlg
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
switch
(
msg
)
...
...
@@ -1341,6 +1430,19 @@ static void test_edit_dialog(void)
ok
(
33
==
r
,
"Expected %d, got %d
\n
"
,
33
,
r
);
}
static
void
test_multi_edit_dialog
(
void
)
{
int
r
;
/* test for multiple edit dialogs (bug 12319) */
r
=
DialogBoxParam
(
hinst
,
"MULTI_EDIT_DIALOG"
,
NULL
,
(
DLGPROC
)
multi_edit_dialog_proc
,
0
);
ok
(
2222
==
r
,
"Expected %d, got %d
\n
"
,
2222
,
r
);
r
=
DialogBoxParam
(
hinst
,
"MULTI_EDIT_DIALOG"
,
NULL
,
(
DLGPROC
)
multi_edit_dialog_proc
,
1
);
ok
(
1111
==
r
,
"Expected %d, got %d
\n
"
,
1111
,
r
);
r
=
DialogBoxParam
(
hinst
,
"MULTI_EDIT_DIALOG"
,
NULL
,
(
DLGPROC
)
multi_edit_dialog_proc
,
2
);
ok
(
2222
==
r
,
"Expected %d, got %d
\n
"
,
2222
,
r
);
}
static
BOOL
RegisterWindowClasses
(
void
)
{
WNDCLASSA
test2
;
...
...
@@ -1410,6 +1512,7 @@ START_TEST(edit)
test_espassword
();
test_undo
();
test_edit_dialog
();
test_multi_edit_dialog
();
UnregisterWindowClasses
();
}
dlls/user32/tests/resource.rc
View file @
08a4d2af
...
...
@@ -98,6 +98,16 @@ BEGIN
PUSHBUTTON "Cancel",IDCANCEL,129,24,50,14
END
MULTI_EDIT_DIALOG DIALOG DISCARDABLE 0, 0, 160, 75
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
CAPTION "Multiple Edit Test"
FONT 8, "MS Shell Dlg"
{
EDITTEXT 1000, 5, 5, 150, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
EDITTEXT 1001, 5, 25, 150, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
EDITTEXT 1002, 5, 45, 150, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
}
EDIT_DIALOG DIALOG DISCARDABLE 0, 0, 160, 80
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | DS_CENTER
CAPTION "Edit Test"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment