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
a3551214
Commit
a3551214
authored
Jul 26, 2011
by
André Hentschel
Committed by
Alexandre Julliard
Jul 28, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Fix for finding nested default buttons.
parent
327eb313
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
3 deletions
+34
-3
propsheet.c
dlls/comctl32/tests/propsheet.c
+0
-1
dialog.c
dlls/user32/dialog.c
+33
-1
dialog.c
dlls/user32/tests/dialog.c
+1
-1
No files found.
dlls/comctl32/tests/propsheet.c
View file @
a3551214
...
...
@@ -502,7 +502,6 @@ static void test_custom_default_button(void)
}
}
todo_wine
ok
(
add_button_has_been_pressed
,
"The Add button has not been pressed!
\n
"
);
DestroyWindow
(
hdlg
);
...
...
dlls/user32/dialog.c
View file @
a3551214
...
...
@@ -1120,6 +1120,38 @@ static void DIALOG_FixChildrenOnChangeFocus (HWND hwndDlg, HWND hwndNext)
}
/***********************************************************************
* DIALOG_IdToHwnd
*
* A recursive version of GetDlgItem
*
* RETURNS
* The HWND for a Child ID.
*/
static
HWND
DIALOG_IdToHwnd
(
HWND
hwndDlg
,
INT
id
)
{
int
i
;
HWND
*
list
=
WIN_ListChildren
(
hwndDlg
);
HWND
ret
=
0
;
if
(
!
list
)
return
0
;
for
(
i
=
0
;
list
[
i
];
i
++
)
{
if
(
GetWindowLongPtrW
(
list
[
i
],
GWLP_ID
)
==
id
)
{
ret
=
list
[
i
];
break
;
}
/* Recurse into every child */
if
((
ret
=
DIALOG_IdToHwnd
(
list
[
i
],
id
)))
break
;
}
HeapFree
(
GetProcessHeap
(),
0
,
list
);
return
ret
;
}
/***********************************************************************
* IsDialogMessageW (USER32.@)
*/
BOOL
WINAPI
IsDialogMessageW
(
HWND
hwndDlg
,
LPMSG
msg
)
...
...
@@ -1227,7 +1259,7 @@ BOOL WINAPI IsDialogMessageW( HWND hwndDlg, LPMSG msg )
}
else
if
(
DC_HASDEFID
==
HIWORD
(
dw
=
SendMessageW
(
hwndDlg
,
DM_GETDEFID
,
0
,
0
)))
{
HWND
hwndDef
=
GetDlgItem
(
hwndDlg
,
LOWORD
(
dw
));
HWND
hwndDef
=
DIALOG_IdToHwnd
(
hwndDlg
,
LOWORD
(
dw
));
if
(
hwndDef
?
IsWindowEnabled
(
hwndDef
)
:
LOWORD
(
dw
)
==
IDOK
)
SendMessageW
(
hwndDlg
,
WM_COMMAND
,
MAKEWPARAM
(
LOWORD
(
dw
),
BN_CLICKED
),
(
LPARAM
)
hwndDef
);
}
...
...
dlls/user32/tests/dialog.c
View file @
a3551214
...
...
@@ -709,7 +709,7 @@ static void test_WM_NEXTDLGCTL(void)
g_bReceivedCommand
=
FALSE
;
FormEnterMsg
(
&
msg
,
child3
);
ok
(
IsDialogMessage
(
g_hwndTestDlg
,
&
msg
),
"Did not handle the ENTER
\n
"
);
todo_wine
ok
(
g_bReceivedCommand
,
"Did not trigger the default Button action
\n
"
);
ok
(
g_bReceivedCommand
,
"Did not trigger the default Button action
\n
"
);
DestroyWindow
(
child3
);
DestroyWindow
(
child2
);
...
...
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