Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
e05f6451
Commit
e05f6451
authored
Aug 31, 2022
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Add helper for calling PROPERTYSHEETPAGE callback.
parent
e5bfd522
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
propsheet.c
dlls/comctl32/propsheet.c
+13
-12
No files found.
dlls/comctl32/propsheet.c
View file @
e05f6451
...
...
@@ -106,7 +106,6 @@ typedef struct tagPropPageInfo
BOOL
isDirty
;
LPCWSTR
pszText
;
BOOL
hasHelp
;
BOOL
useCallback
;
BOOL
hasIcon
;
}
PropPageInfo
;
...
...
@@ -199,6 +198,15 @@ static WCHAR *heap_strdupAtoW(const char *str)
return
ret
;
}
static
void
HPSP_call_callback
(
HPROPSHEETPAGE
hpsp
,
UINT
msg
)
{
if
(
!
(
hpsp
->
psp
.
dwFlags
&
PSP_USECALLBACK
)
||
!
hpsp
->
psp
.
pfnCallback
||
(
msg
==
PSPCB_ADDREF
&&
hpsp
->
psp
.
dwSize
<=
PROPSHEETPAGEA_V1_SIZE
))
return
;
hpsp
->
psp
.
pfnCallback
(
0
,
msg
,
&
hpsp
->
callback_psp
);
}
#define add_flag(a) if (dwFlags & a) {strcat(string, #a );strcat(string," ");}
/******************************************************************************
* PROPSHEET_UnImplementedFlags
...
...
@@ -419,7 +427,6 @@ static BOOL PROPSHEET_CollectPageInfo(HPROPSHEETPAGE hpsp,
* Process property page flags.
*/
dwFlags
=
hpsp
->
psp
.
dwFlags
;
psInfo
->
proppage
[
index
].
useCallback
=
(
dwFlags
&
PSP_USECALLBACK
)
&&
(
hpsp
->
psp
.
pfnCallback
);
psInfo
->
proppage
[
index
].
hasHelp
=
dwFlags
&
PSP_HASHELP
;
psInfo
->
proppage
[
index
].
hasIcon
=
dwFlags
&
(
PSP_USEHICON
|
PSP_USEICONID
);
...
...
@@ -1436,8 +1443,7 @@ static BOOL PROPSHEET_CreatePage(HWND hwndParent,
pTemplateCopy
->
dwExtendedStyle
|=
WS_EX_CONTROLPARENT
;
}
if
(
psInfo
->
proppage
[
index
].
useCallback
)
(
*
(
hpsp
->
psp
.
pfnCallback
))(
0
,
PSPCB_CREATE
,
&
hpsp
->
psp
);
HPSP_call_callback
(
hpsp
,
PSPCB_CREATE
);
if
(
hpsp
->
psp
.
dwFlags
&
PSP_INTERNAL_UNICODE
)
hwndPage
=
CreateDialogIndirectParamW
(
hpsp
->
psp
.
hInstance
,
...
...
@@ -3013,9 +3019,7 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(
else
ppsp
->
pszHeaderSubTitle
=
NULL
;
if
((
ppsp
->
dwFlags
&
PSP_USECALLBACK
)
&&
ppsp
->
dwSize
>
PROPSHEETPAGEA_V1_SIZE
&&
ppsp
->
pfnCallback
)
ppsp
->
pfnCallback
(
0
,
PSPCB_ADDREF
,
ppsp
+
1
);
HPSP_call_callback
(
ret
,
PSPCB_ADDREF
);
return
ret
;
}
...
...
@@ -3074,9 +3078,7 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage
else
ppsp
->
pszHeaderSubTitle
=
NULL
;
if
((
ppsp
->
dwFlags
&
PSP_USECALLBACK
)
&&
ppsp
->
dwSize
>
PROPSHEETPAGEW_V1_SIZE
&&
ppsp
->
pfnCallback
)
ppsp
->
pfnCallback
(
0
,
PSPCB_ADDREF
,
ppsp
+
1
);
HPSP_call_callback
(
ret
,
PSPCB_ADDREF
);
return
ret
;
}
...
...
@@ -3098,8 +3100,7 @@ BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE hPropPage)
if
(
!
hPropPage
)
return
FALSE
;
if
((
psp
->
dwFlags
&
PSP_USECALLBACK
)
&&
psp
->
pfnCallback
)
psp
->
pfnCallback
(
0
,
PSPCB_RELEASE
,
&
hPropPage
->
callback_psp
);
HPSP_call_callback
(
hPropPage
,
PSPCB_RELEASE
);
if
(
!
(
psp
->
dwFlags
&
PSP_DLGINDIRECT
)
&&
!
IS_INTRESOURCE
(
psp
->
u
.
pszTemplate
))
Free
((
void
*
)
psp
->
u
.
pszTemplate
);
...
...
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