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
fdd44313
Commit
fdd44313
authored
Aug 31, 2022
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 14, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Introduce _PSP structure to store HPROPSHEETPAGE data.
parent
241c2639
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
19 deletions
+21
-19
propsheet.c
dlls/comctl32/propsheet.c
+21
-19
No files found.
dlls/comctl32/propsheet.c
View file @
fdd44313
...
...
@@ -93,6 +93,12 @@ typedef struct
}
MyDLGITEMTEMPLATEEX
;
#include "poppack.h"
struct
_PSP
{
PROPSHEETPAGEW
psp
;
PROPSHEETPAGEW
callback_psp
;
};
typedef
struct
tagPropPageInfo
{
HPROPSHEETPAGE
hpage
;
/* to keep track of pages not passed to PropertySheet */
...
...
@@ -2953,21 +2959,19 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(
LPCPROPSHEETPAGEA
lpPropSheetPage
)
{
PROPSHEETPAGEW
*
ppsp
;
HPROPSHEETPAGE
ret
;
if
(
lpPropSheetPage
->
dwSize
<
PROPSHEETPAGEA_V1_SIZE
)
return
NULL
;
ret
=
Alloc
(
sizeof
(
*
ret
));
ppsp
=
&
ret
->
psp
;
memcpy
(
ppsp
,
lpPropSheetPage
,
min
(
lpPropSheetPage
->
dwSize
,
sizeof
(
PROPSHEETPAGEA
)));
/* original data is used for callback notifications */
if
((
lpPropSheetPage
->
dwFlags
&
PSP_USECALLBACK
)
&&
lpPropSheetPage
->
pfnCallback
)
{
ppsp
=
Alloc
(
2
*
sizeof
(
*
ppsp
));
memcpy
(
ppsp
,
lpPropSheetPage
,
min
(
lpPropSheetPage
->
dwSize
,
sizeof
(
PROPSHEETPAGEA
)));
memcpy
(
ppsp
+
1
,
lpPropSheetPage
,
min
(
lpPropSheetPage
->
dwSize
,
sizeof
(
PROPSHEETPAGEA
)));
}
else
{
ppsp
=
Alloc
(
sizeof
(
*
ppsp
));
memcpy
(
ppsp
,
lpPropSheetPage
,
min
(
lpPropSheetPage
->
dwSize
,
sizeof
(
PROPSHEETPAGEA
)));
memcpy
(
&
ret
->
callback_psp
,
lpPropSheetPage
,
min
(
lpPropSheetPage
->
dwSize
,
sizeof
(
PROPSHEETPAGEA
)));
}
ppsp
->
dwFlags
&=
~
PSP_INTERNAL_UNICODE
;
...
...
@@ -3025,7 +3029,7 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(
if
((
ppsp
->
dwFlags
&
PSP_USECALLBACK
)
&&
ppsp
->
dwSize
>
PROPSHEETPAGEA_V1_SIZE
&&
ppsp
->
pfnCallback
)
ppsp
->
pfnCallback
(
0
,
PSPCB_ADDREF
,
ppsp
+
1
);
return
(
HPROPSHEETPAGE
)
ppsp
;
return
ret
;
}
/******************************************************************************
...
...
@@ -3036,21 +3040,19 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(
HPROPSHEETPAGE
WINAPI
CreatePropertySheetPageW
(
LPCPROPSHEETPAGEW
lpPropSheetPage
)
{
PROPSHEETPAGEW
*
ppsp
;
HPROPSHEETPAGE
ret
;
if
(
lpPropSheetPage
->
dwSize
<
PROPSHEETPAGEW_V1_SIZE
)
return
NULL
;
ret
=
Alloc
(
sizeof
(
*
ret
));
ppsp
=
&
ret
->
psp
;
memcpy
(
ppsp
,
lpPropSheetPage
,
min
(
lpPropSheetPage
->
dwSize
,
sizeof
(
PROPSHEETPAGEW
)));
/* original data is used for callback notifications */
if
((
lpPropSheetPage
->
dwFlags
&
PSP_USECALLBACK
)
&&
lpPropSheetPage
->
pfnCallback
)
{
ppsp
=
Alloc
(
2
*
sizeof
(
*
ppsp
));
memcpy
(
ppsp
,
lpPropSheetPage
,
min
(
lpPropSheetPage
->
dwSize
,
sizeof
(
PROPSHEETPAGEW
)));
memcpy
(
ppsp
+
1
,
lpPropSheetPage
,
min
(
lpPropSheetPage
->
dwSize
,
sizeof
(
PROPSHEETPAGEW
)));
}
else
{
ppsp
=
Alloc
(
sizeof
(
*
ppsp
));
memcpy
(
ppsp
,
lpPropSheetPage
,
min
(
lpPropSheetPage
->
dwSize
,
sizeof
(
PROPSHEETPAGEW
)));
memcpy
(
&
ret
->
callback_psp
,
lpPropSheetPage
,
min
(
lpPropSheetPage
->
dwSize
,
sizeof
(
PROPSHEETPAGEW
)));
}
ppsp
->
dwFlags
|=
PSP_INTERNAL_UNICODE
;
...
...
@@ -3088,7 +3090,7 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage
if
((
ppsp
->
dwFlags
&
PSP_USECALLBACK
)
&&
ppsp
->
dwSize
>
PROPSHEETPAGEW_V1_SIZE
&&
ppsp
->
pfnCallback
)
ppsp
->
pfnCallback
(
0
,
PSPCB_ADDREF
,
ppsp
+
1
);
return
(
HPROPSHEETPAGE
)
ppsp
;
return
ret
;
}
/******************************************************************************
...
...
@@ -3106,7 +3108,7 @@ BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE hPropPage)
{
PROPSHEETPAGEW
*
psp
=
(
PROPSHEETPAGEW
*
)
hPropPage
;
if
(
!
psp
)
if
(
!
hPropPage
)
return
FALSE
;
if
((
psp
->
dwFlags
&
PSP_USECALLBACK
)
&&
psp
->
pfnCallback
)
...
...
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