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
38387dcf
Commit
38387dcf
authored
Mar 28, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Mar 29, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: IsDialogMessage should allow control ids other than IDOK when processing WM_KEYDOWN.
parent
0e4ceb9a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
9 deletions
+27
-9
dialog.c
dlls/user32/dialog.c
+1
-1
dialog.c
dlls/user32/tests/dialog.c
+26
-8
No files found.
dlls/user32/dialog.c
View file @
38387dcf
...
...
@@ -1278,7 +1278,7 @@ BOOL WINAPI IsDialogMessageW( HWND hwndDlg, LPMSG msg )
else
if
(
DC_HASDEFID
==
HIWORD
(
dw
=
SendMessageW
(
hwndDlg
,
DM_GETDEFID
,
0
,
0
)))
{
HWND
hwndDef
=
DIALOG_IdToHwnd
(
hwndDlg
,
LOWORD
(
dw
));
if
(
hwndDef
?
IsWindowEnabled
(
hwndDef
)
:
LOWORD
(
dw
)
==
IDOK
)
if
(
!
hwndDef
||
IsWindowEnabled
(
hwndDef
)
)
SendMessageW
(
hwndDlg
,
WM_COMMAND
,
MAKEWPARAM
(
LOWORD
(
dw
),
BN_CLICKED
),
(
LPARAM
)
hwndDef
);
}
else
...
...
dlls/user32/tests/dialog.c
View file @
38387dcf
...
...
@@ -1065,20 +1065,38 @@ static INT_PTR CALLBACK TestDefButtonDlgProc (HWND hDlg, UINT uiMsg,
static
INT_PTR
CALLBACK
TestReturnKeyDlgProc
(
HWND
hDlg
,
UINT
uiMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
static
int
received_idok
=
0
;
static
int
received_idok
;
switch
(
uiMsg
)
{
case
WM_INITDIALOG
:
{
MSG
msg
=
{
hDlg
,
WM_KEYDOWN
,
VK_RETURN
,
0x011c0001
};
IsDialogMessage
(
hDlg
,
&
msg
);
}
ok
(
received_idok
,
"WM_COMMAND not received
\n
"
);
{
MSG
msg
=
{
hDlg
,
WM_KEYDOWN
,
VK_RETURN
,
0x011c0001
};
received_idok
=
-
1
;
IsDialogMessage
(
hDlg
,
&
msg
);
ok
(
received_idok
==
0xdead
,
"WM_COMMAND/0xdead not received
\n
"
);
received_idok
=
-
2
;
IsDialogMessage
(
hDlg
,
&
msg
);
ok
(
received_idok
==
IDOK
,
"WM_COMMAND/IDOK not received
\n
"
);
EndDialog
(
hDlg
,
0
);
return
TRUE
;
}
case
DM_GETDEFID
:
if
(
received_idok
==
-
1
)
{
HWND
hwnd
=
GetDlgItem
(
hDlg
,
0xdead
);
ok
(
!
hwnd
,
"dialog item with ID 0xdead should not exist
\n
"
);
SetWindowLong
(
hDlg
,
DWLP_MSGRESULT
,
MAKELRESULT
(
0xdead
,
DC_HASDEFID
));
return
TRUE
;
}
return
FALSE
;
case
WM_COMMAND
:
ok
(
wParam
==
IDOK
,
"Expected IDOK
\n
"
);
received_idok
=
1
;
received_idok
=
wParam
;
return
TRUE
;
}
return
FALSE
;
...
...
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