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
c7b5108c
Commit
c7b5108c
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: Use HPROPSHEETPAGE directly in PROPSHEET_CollectPageInfo.
parent
fdd44313
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
23 deletions
+21
-23
propsheet.c
dlls/comctl32/propsheet.c
+21
-23
No files found.
dlls/comctl32/propsheet.c
View file @
c7b5108c
...
...
@@ -400,7 +400,7 @@ static void PROPSHEET_CollectSheetInfoW(LPCPROPSHEETHEADERW lppsh,
* Collect property sheet data.
* With code taken from DIALOG_ParseTemplate32.
*/
static
BOOL
PROPSHEET_CollectPageInfo
(
LPCPROPSHEETPAGEW
lp
psp
,
static
BOOL
PROPSHEET_CollectPageInfo
(
HPROPSHEETPAGE
h
psp
,
PropSheetInfo
*
psInfo
,
int
index
,
BOOL
resize
)
{
...
...
@@ -409,19 +409,19 @@ static BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEW lppsp,
DWORD
dwFlags
;
int
width
,
height
;
if
(
!
lp
psp
)
if
(
!
h
psp
)
return
FALSE
;
TRACE
(
"
\n
"
);
psInfo
->
proppage
[
index
].
hpage
=
(
HPROPSHEETPAGE
)
lp
psp
;
psInfo
->
proppage
[
index
].
hpage
=
h
psp
;
psInfo
->
proppage
[
index
].
hwndPage
=
0
;
psInfo
->
proppage
[
index
].
isDirty
=
FALSE
;
/*
* Process property page flags.
*/
dwFlags
=
lppsp
->
dwFlags
;
psInfo
->
proppage
[
index
].
useCallback
=
(
dwFlags
&
PSP_USECALLBACK
)
&&
(
lppsp
->
pfnCallback
);
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
);
...
...
@@ -433,22 +433,22 @@ static BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEW lppsp,
* Process page template.
*/
if
(
dwFlags
&
PSP_DLGINDIRECT
)
pTemplate
=
lppsp
->
u
.
pResource
;
pTemplate
=
hpsp
->
psp
.
u
.
pResource
;
else
if
(
dwFlags
&
PSP_INTERNAL_UNICODE
)
{
HRSRC
hResource
=
FindResourceW
(
lppsp
->
hInstance
,
lppsp
->
u
.
pszTemplate
,
HRSRC
hResource
=
FindResourceW
(
hpsp
->
psp
.
hInstance
,
hpsp
->
psp
.
u
.
pszTemplate
,
(
LPWSTR
)
RT_DIALOG
);
HGLOBAL
hTemplate
=
LoadResource
(
lppsp
->
hInstance
,
HGLOBAL
hTemplate
=
LoadResource
(
hpsp
->
psp
.
hInstance
,
hResource
);
pTemplate
=
LockResource
(
hTemplate
);
}
else
{
HRSRC
hResource
=
FindResourceA
(
lppsp
->
hInstance
,
(
LPCSTR
)
lppsp
->
u
.
pszTemplate
,
HRSRC
hResource
=
FindResourceA
(
hpsp
->
psp
.
hInstance
,
(
LPCSTR
)
hpsp
->
psp
.
u
.
pszTemplate
,
(
LPSTR
)
RT_DIALOG
);
HGLOBAL
hTemplate
=
LoadResource
(
lppsp
->
hInstance
,
HGLOBAL
hTemplate
=
LoadResource
(
hpsp
->
psp
.
hInstance
,
hResource
);
pTemplate
=
LockResource
(
hTemplate
);
}
...
...
@@ -485,7 +485,7 @@ static BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEW lppsp,
width
=
(
WORD
)
*
p
;
p
++
;
height
=
(
WORD
)
*
p
;
p
++
;
if
(
lppsp
->
dwFlags
&
(
PSP_USEHEADERTITLE
|
PSP_USEHEADERSUBTITLE
))
if
(
hpsp
->
psp
.
dwFlags
&
(
PSP_USEHEADERTITLE
|
PSP_USEHEADERSUBTITLE
))
psInfo
->
ppshheader
.
dwFlags
|=
PSH_HEADER
;
/* Special calculation for interior wizard pages so the largest page is
...
...
@@ -552,9 +552,9 @@ static BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEW lppsp,
WCHAR
szTitle
[
256
];
const
WCHAR
*
pTitle
;
if
(
IS_INTRESOURCE
(
lppsp
->
pszTitle
))
if
(
IS_INTRESOURCE
(
hpsp
->
psp
.
pszTitle
))
{
if
(
LoadStringW
(
lppsp
->
hInstance
,
(
DWORD_PTR
)
lppsp
->
pszTitle
,
szTitle
,
ARRAY_SIZE
(
szTitle
)))
if
(
LoadStringW
(
hpsp
->
psp
.
hInstance
,
(
DWORD_PTR
)
hpsp
->
psp
.
pszTitle
,
szTitle
,
ARRAY_SIZE
(
szTitle
)))
pTitle
=
szTitle
;
else
if
(
*
p
)
pTitle
=
p
;
...
...
@@ -562,7 +562,7 @@ static BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEW lppsp,
pTitle
=
L"(null)"
;
}
else
pTitle
=
lppsp
->
pszTitle
;
pTitle
=
hpsp
->
psp
.
pszTitle
;
psInfo
->
proppage
[
index
].
pszText
=
heap_strdupW
(
pTitle
);
}
...
...
@@ -577,10 +577,10 @@ static BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEW lppsp,
int
icon_cy
=
GetSystemMetrics
(
SM_CYSMICON
);
if
(
dwFlags
&
PSP_USEICONID
)
hIcon
=
LoadImageW
(
lppsp
->
hInstance
,
lppsp
->
u2
.
pszIcon
,
IMAGE_ICON
,
hIcon
=
LoadImageW
(
hpsp
->
psp
.
hInstance
,
hpsp
->
psp
.
u2
.
pszIcon
,
IMAGE_ICON
,
icon_cx
,
icon_cy
,
LR_DEFAULTCOLOR
);
else
hIcon
=
lppsp
->
u2
.
hIcon
;
hIcon
=
hpsp
->
psp
.
u2
.
hIcon
;
if
(
hIcon
)
{
...
...
@@ -2283,7 +2283,7 @@ static BOOL PROPSHEET_InsertPage(HWND hwndDlg, HPROPSHEETPAGE hpageInsertAfter,
memcpy
(
&
ppi
[
index
+
1
],
&
prev_ppi
[
index
],
(
psInfo
->
nPages
-
index
)
*
sizeof
(
PropPageInfo
));
psInfo
->
proppage
=
ppi
;
if
(
!
PROPSHEET_CollectPageInfo
(
ppsp
,
psInfo
,
index
,
FALSE
))
if
(
!
PROPSHEET_CollectPageInfo
(
hpage
,
psInfo
,
index
,
FALSE
))
{
psInfo
->
proppage
=
prev_ppi
;
Free
(
ppi
);
...
...
@@ -2851,8 +2851,7 @@ INT_PTR WINAPI PropertySheetA(LPCPROPSHEETHEADERA lppsh)
pByte
+=
((
LPCPROPSHEETPAGEA
)
pByte
)
->
dwSize
;
}
if
(
!
PROPSHEET_CollectPageInfo
((
LPCPROPSHEETPAGEW
)
psInfo
->
proppage
[
n
].
hpage
,
psInfo
,
n
,
TRUE
))
if
(
!
PROPSHEET_CollectPageInfo
(
psInfo
->
proppage
[
n
].
hpage
,
psInfo
,
n
,
TRUE
))
{
if
(
psInfo
->
usePropPage
)
DestroyPropertySheetPage
(
psInfo
->
proppage
[
n
].
hpage
);
...
...
@@ -2892,8 +2891,7 @@ INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
pByte
+=
((
LPCPROPSHEETPAGEW
)
pByte
)
->
dwSize
;
}
if
(
!
PROPSHEET_CollectPageInfo
((
LPCPROPSHEETPAGEW
)
psInfo
->
proppage
[
n
].
hpage
,
psInfo
,
n
,
TRUE
))
if
(
!
PROPSHEET_CollectPageInfo
(
psInfo
->
proppage
[
n
].
hpage
,
psInfo
,
n
,
TRUE
))
{
if
(
psInfo
->
usePropPage
)
DestroyPropertySheetPage
(
psInfo
->
proppage
[
n
].
hpage
);
...
...
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