Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
f8924e3e
Commit
f8924e3e
authored
Jun 15, 2016
by
Dmitry Timoshkov
Committed by
Vitaly Lipatov
Jul 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Use root dialog for DM_SETDEFID/DM_GETDEFID in DefDlgProc.
This patch fixes DM_SETDEFID/DM_GETDEFID handling in complex dialog structures such as a property sheet.
parent
3d2bbc6c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
defdlg.c
dlls/user32/defdlg.c
+25
-0
No files found.
dlls/user32/defdlg.c
View file @
f8924e3e
...
...
@@ -188,6 +188,25 @@ static BOOL DEFDLG_SetDefButton( HWND hwndDlg, DIALOGINFO *dlgInfo, HWND hwndNew
}
static
HWND
root_dialog
(
HWND
hwnd
)
{
while
((
GetWindowLongA
(
hwnd
,
GWL_EXSTYLE
)
&
WS_EX_CONTROLPARENT
)
&&
(
GetWindowLongA
(
hwnd
,
GWL_STYLE
)
&
(
WS_CHILD
|
WS_POPUP
))
==
WS_CHILD
)
{
HWND
parent
=
GetParent
(
hwnd
);
if
(
!
DIALOG_get_info
(
parent
,
FALSE
))
break
;
hwnd
=
parent
;
if
(
!
(
GetWindowLongA
(
hwnd
,
GWL_STYLE
)
&
DS_CONTROL
))
break
;
}
return
hwnd
;
}
/***********************************************************************
* DEFDLG_Proc
*
...
...
@@ -239,11 +258,17 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam,
return
0
;
case
DM_SETDEFID
:
hwnd
=
root_dialog
(
hwnd
);
dlgInfo
=
DIALOG_get_info
(
hwnd
,
FALSE
);
if
(
dlgInfo
&&
!
(
dlgInfo
->
flags
&
DF_END
))
DEFDLG_SetDefId
(
hwnd
,
dlgInfo
,
wParam
);
return
1
;
case
DM_GETDEFID
:
hwnd
=
root_dialog
(
hwnd
);
dlgInfo
=
DIALOG_get_info
(
hwnd
,
FALSE
);
if
(
dlgInfo
&&
!
(
dlgInfo
->
flags
&
DF_END
))
{
HWND
hwndDefId
;
...
...
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