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
592d994f
Commit
592d994f
authored
Sep 14, 2010
by
Vladimir Panteleev
Committed by
Alexandre Julliard
Sep 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Fix VK_RETURN handling in IsDialogMessage for dialogs without an IDOK.
parent
fe0df211
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
4 deletions
+26
-4
dialog.c
dlls/user32/dialog.c
+2
-4
dialog.c
dlls/user32/tests/dialog.c
+24
-0
No files found.
dlls/user32/dialog.c
View file @
592d994f
...
@@ -1221,10 +1221,8 @@ BOOL WINAPI IsDialogMessageW( HWND hwndDlg, LPMSG msg )
...
@@ -1221,10 +1221,8 @@ BOOL WINAPI IsDialogMessageW( HWND hwndDlg, LPMSG msg )
else
if
(
DC_HASDEFID
==
HIWORD
(
dw
=
SendMessageW
(
hwndDlg
,
DM_GETDEFID
,
0
,
0
)))
else
if
(
DC_HASDEFID
==
HIWORD
(
dw
=
SendMessageW
(
hwndDlg
,
DM_GETDEFID
,
0
,
0
)))
{
{
HWND
hwndDef
=
GetDlgItem
(
hwndDlg
,
LOWORD
(
dw
));
HWND
hwndDef
=
GetDlgItem
(
hwndDlg
,
LOWORD
(
dw
));
if
(
!
hwndDef
||
!
IsWindowEnabled
(
hwndDef
))
if
(
hwndDef
?
IsWindowEnabled
(
hwndDef
)
:
LOWORD
(
dw
)
==
IDOK
)
return
TRUE
;
SendMessageW
(
hwndDlg
,
WM_COMMAND
,
MAKEWPARAM
(
LOWORD
(
dw
),
BN_CLICKED
),
(
LPARAM
)
hwndDef
);
SendMessageW
(
hwndDlg
,
WM_COMMAND
,
MAKEWPARAM
(
LOWORD
(
dw
),
BN_CLICKED
),
(
LPARAM
)
GetDlgItem
(
hwndDlg
,
LOWORD
(
dw
)));
}
}
else
else
{
{
...
...
dlls/user32/tests/dialog.c
View file @
592d994f
...
@@ -1000,6 +1000,28 @@ static INT_PTR CALLBACK TestDefButtonDlgProc (HWND hDlg, UINT uiMsg,
...
@@ -1000,6 +1000,28 @@ static INT_PTR CALLBACK TestDefButtonDlgProc (HWND hDlg, UINT uiMsg,
return
FALSE
;
return
FALSE
;
}
}
static
INT_PTR
CALLBACK
TestReturnKeyDlgProc
(
HWND
hDlg
,
UINT
uiMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
static
int
received_idok
=
0
;
switch
(
uiMsg
)
{
case
WM_INITDIALOG
:
{
MSG
msg
=
{
hDlg
,
WM_KEYDOWN
,
VK_RETURN
,
0x011c0001
};
IsDialogMessage
(
hDlg
,
&
msg
);
}
ok
(
received_idok
,
"WM_COMMAND not received
\n
"
);
EndDialog
(
hDlg
,
0
);
return
TRUE
;
case
WM_COMMAND
:
ok
(
wParam
==
IDOK
,
"Expected IDOK
\n
"
);
received_idok
=
1
;
return
TRUE
;
}
return
FALSE
;
}
static
void
test_DialogBoxParamA
(
void
)
static
void
test_DialogBoxParamA
(
void
)
{
{
INT_PTR
ret
;
INT_PTR
ret
;
...
@@ -1044,6 +1066,8 @@ static void test_DialogBoxParamA(void)
...
@@ -1044,6 +1066,8 @@ static void test_DialogBoxParamA(void)
ret
=
DialogBoxParamA
(
GetModuleHandle
(
NULL
),
"TEST_EMPTY_DIALOG"
,
0
,
TestDefButtonDlgProc
,
0
);
ret
=
DialogBoxParamA
(
GetModuleHandle
(
NULL
),
"TEST_EMPTY_DIALOG"
,
0
,
TestDefButtonDlgProc
,
0
);
ok
(
ret
==
IDOK
,
"Expected IDOK
\n
"
);
ok
(
ret
==
IDOK
,
"Expected IDOK
\n
"
);
DialogBoxParamA
(
GetModuleHandle
(
NULL
),
"TEST_EMPTY_DIALOG"
,
0
,
TestReturnKeyDlgProc
,
0
);
}
}
static
void
test_DisabledDialogTest
(
void
)
static
void
test_DisabledDialogTest
(
void
)
...
...
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