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
d75deeec
Commit
d75deeec
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: Don't cast HPROPSHEETPAGE to PROPSHEETPAGEW*.
parent
fd6c1d59
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
26 deletions
+19
-26
propsheet.c
dlls/comctl32/propsheet.c
+19
-26
No files found.
dlls/comctl32/propsheet.c
View file @
d75deeec
...
...
@@ -281,10 +281,8 @@ static INT PROPSHEET_FindPageByResId(const PropSheetInfo * psInfo, LRESULT resId
for
(
i
=
0
;
i
<
psInfo
->
nPages
;
i
++
)
{
LPCPROPSHEETPAGEA
lppsp
=
(
LPCPROPSHEETPAGEA
)
psInfo
->
proppage
[
i
].
hpage
;
/* Fixme: if resource ID is a string shall we use strcmp ??? */
if
(
lppsp
->
u
.
pszTemplate
==
(
LPVOID
)
resId
)
if
(
psInfo
->
proppage
[
i
].
hpage
->
psp
.
u
.
pszTemplate
==
(
LPVOID
)
resId
)
break
;
}
...
...
@@ -1514,7 +1512,6 @@ static BOOL PROPSHEET_ShowPage(HWND hwndDlg, int index, PropSheetInfo * psInfo)
HWND
hwndTabCtrl
;
HWND
hwndLineHeader
;
HWND
control
;
LPCPROPSHEETPAGEW
ppshpage
;
TRACE
(
"active_page %d, index %d
\n
"
,
psInfo
->
active_page
,
index
);
if
(
index
==
psInfo
->
active_page
)
...
...
@@ -1555,9 +1552,9 @@ static BOOL PROPSHEET_ShowPage(HWND hwndDlg, int index, PropSheetInfo * psInfo)
if
(
psInfo
->
ppshheader
.
dwFlags
&
(
PSH_WIZARD97_OLD
|
PSH_WIZARD97_NEW
)
)
{
hwndLineHeader
=
GetDlgItem
(
hwndDlg
,
IDC_SUNKEN_LINEHEADER
);
ppshpage
=
(
LPCPROPSHEETPAGEW
)
psInfo
->
proppage
[
index
].
hpage
;
if
((
ppshpage
->
dwFlags
&
PSP_HIDEHEADER
)
||
(
!
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_HEADER
))
)
if
((
psInfo
->
proppage
[
index
].
hpage
->
psp
.
dwFlags
&
PSP_HIDEHEADER
)
||
(
!
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_HEADER
))
)
ShowWindow
(
hwndLineHeader
,
SW_HIDE
);
else
ShowWindow
(
hwndLineHeader
,
SW_SHOW
);
...
...
@@ -2399,9 +2396,9 @@ static BOOL PROPSHEET_RemovePage(HWND hwndDlg,
psInfo
->
active_page
--
;
/* Unsubclass the page dialog window */
if
((
psInfo
->
ppshheader
.
dwFlags
&
(
PSH_WIZARD97_NEW
|
PSH_WIZARD97_OLD
)
&&
if
((
psInfo
->
ppshheader
.
dwFlags
&
(
PSH_WIZARD97_NEW
|
PSH_WIZARD97_OLD
)
)
&&
(
psInfo
->
ppshheader
.
dwFlags
&
PSH_WATERMARK
)
&&
(
(
PROPSHEETPAGEW
*
)
psInfo
->
proppage
[
index
].
hpage
)
->
dwFlags
&
PSP_HIDEHEADER
))
(
psInfo
->
proppage
[
index
].
hpage
->
psp
.
dwFlags
&
PSP_HIDEHEADER
))
{
RemoveWindowSubclass
(
psInfo
->
proppage
[
index
].
hwndPage
,
PROPSHEET_WizardSubclassProc
,
1
);
...
...
@@ -2413,9 +2410,7 @@ static BOOL PROPSHEET_RemovePage(HWND hwndDlg,
/* Free page resources */
if
(
psInfo
->
proppage
[
index
].
hpage
)
{
PROPSHEETPAGEW
*
psp
=
(
PROPSHEETPAGEW
*
)
psInfo
->
proppage
[
index
].
hpage
;
if
(
psp
->
dwFlags
&
PSP_USETITLE
)
if
(
psInfo
->
proppage
[
index
].
hpage
->
psp
.
dwFlags
&
PSP_USETITLE
)
Free
((
LPVOID
)
psInfo
->
proppage
[
index
].
pszText
);
DestroyPropertySheetPage
(
psInfo
->
proppage
[
index
].
hpage
);
...
...
@@ -2505,7 +2500,7 @@ static void PROPSHEET_SetHeaderTitleW(HWND hwndDlg, UINT page_index, const WCHAR
if
(
page_index
>=
psInfo
->
nPages
)
return
;
page
=
(
PROPSHEETPAGEW
*
)
psInfo
->
proppage
[
page_index
].
hpage
;
page
=
&
psInfo
->
proppage
[
page_index
].
hpage
->
psp
;
if
(
!
IS_INTRESOURCE
(
page
->
pszHeaderTitle
))
Free
((
void
*
)
page
->
pszHeaderTitle
);
...
...
@@ -2541,7 +2536,7 @@ static void PROPSHEET_SetHeaderSubTitleW(HWND hwndDlg, UINT page_index, const WC
if
(
page_index
>=
psInfo
->
nPages
)
return
;
page
=
(
PROPSHEETPAGEW
*
)
psInfo
->
proppage
[
page_index
].
hpage
;
page
=
&
psInfo
->
proppage
[
page_index
].
hpage
->
psp
;
if
(
!
IS_INTRESOURCE
(
page
->
pszHeaderSubTitle
))
Free
((
void
*
)
page
->
pszHeaderSubTitle
);
...
...
@@ -2629,12 +2624,10 @@ static LRESULT PROPSHEET_IndexToPage(HWND hwndDlg, int iPageIndex)
static
LRESULT
PROPSHEET_IdToIndex
(
HWND
hwndDlg
,
int
iPageId
)
{
int
index
;
LPCPROPSHEETPAGEW
psp
;
PropSheetInfo
*
psInfo
=
GetPropW
(
hwndDlg
,
PropSheetInfoStr
);
TRACE
(
"(%p, %d)
\n
"
,
hwndDlg
,
iPageId
);
for
(
index
=
0
;
index
<
psInfo
->
nPages
;
index
++
)
{
psp
=
(
LPCPROPSHEETPAGEW
)
psInfo
->
proppage
[
index
].
hpage
;
if
(
psp
->
u
.
pszTemplate
==
MAKEINTRESOURCEW
(
iPageId
))
if
(
psInfo
->
proppage
[
index
].
hpage
->
psp
.
u
.
pszTemplate
==
MAKEINTRESOURCEW
(
iPageId
))
return
index
;
}
...
...
@@ -2653,7 +2646,7 @@ static LRESULT PROPSHEET_IndexToId(HWND hwndDlg, int iPageIndex)
WARN
(
"%d out of range.
\n
"
,
iPageIndex
);
return
0
;
}
psp
=
(
LPCPROPSHEETPAGEW
)
psInfo
->
proppage
[
iPageIndex
].
hpage
;
psp
=
&
psInfo
->
proppage
[
iPageIndex
].
hpage
->
psp
;
if
(
psp
->
dwFlags
&
PSP_DLGINDIRECT
||
!
IS_INTRESOURCE
(
psp
->
u
.
pszTemplate
))
{
return
0
;
}
...
...
@@ -2713,7 +2706,7 @@ static void PROPSHEET_CleanUp(HWND hwndDlg)
for
(
i
=
0
;
i
<
psInfo
->
nPages
;
i
++
)
{
PROPSHEETPAGE
A
*
psp
=
(
PROPSHEETPAGEA
*
)
psInfo
->
proppage
[
i
].
hpage
;
PROPSHEETPAGE
W
*
psp
=
&
psInfo
->
proppage
[
i
].
hpage
->
psp
;
/* Unsubclass the page dialog window */
if
((
psInfo
->
ppshheader
.
dwFlags
&
(
PSH_WIZARD97_NEW
|
PSH_WIZARD97_OLD
))
&&
...
...
@@ -3100,28 +3093,28 @@ HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage
*/
BOOL
WINAPI
DestroyPropertySheetPage
(
HPROPSHEETPAGE
hPropPage
)
{
PROPSHEETPAGEW
*
psp
=
(
PROPSHEETPAGEW
*
)
hPropPage
;
PROPSHEETPAGEW
*
psp
=
&
hPropPage
->
psp
;
if
(
!
hPropPage
)
return
FALSE
;
if
((
psp
->
dwFlags
&
PSP_USECALLBACK
)
&&
psp
->
pfnCallback
)
psp
->
pfnCallback
(
0
,
PSPCB_RELEASE
,
psp
+
1
);
psp
->
pfnCallback
(
0
,
PSPCB_RELEASE
,
&
hPropPage
->
callback_psp
);
if
(
!
(
psp
->
dwFlags
&
PSP_DLGINDIRECT
)
&&
!
IS_INTRESOURCE
(
psp
->
u
.
pszTemplate
))
Free
((
LPVOID
)
psp
->
u
.
pszTemplate
);
Free
((
void
*
)
psp
->
u
.
pszTemplate
);
if
((
psp
->
dwFlags
&
PSP_USEICONID
)
&&
!
IS_INTRESOURCE
(
psp
->
u2
.
pszIcon
))
Free
((
LPVOID
)
psp
->
u2
.
pszIcon
);
Free
((
void
*
)
psp
->
u2
.
pszIcon
);
if
((
psp
->
dwFlags
&
PSP_USETITLE
)
&&
!
IS_INTRESOURCE
(
psp
->
pszTitle
))
Free
((
LPVOID
)
psp
->
pszTitle
);
Free
((
void
*
)
psp
->
pszTitle
);
if
((
psp
->
dwFlags
&
PSP_USEHEADERTITLE
)
&&
!
IS_INTRESOURCE
(
psp
->
pszHeaderTitle
))
Free
((
LPVOID
)
psp
->
pszHeaderTitle
);
Free
((
void
*
)
psp
->
pszHeaderTitle
);
if
((
psp
->
dwFlags
&
PSP_USEHEADERSUBTITLE
)
&&
!
IS_INTRESOURCE
(
psp
->
pszHeaderSubTitle
))
Free
((
LPVOID
)
psp
->
pszHeaderSubTitle
);
Free
((
void
*
)
psp
->
pszHeaderSubTitle
);
Free
(
hPropPage
);
...
...
@@ -3272,7 +3265,7 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam)
if
(
psInfo
->
active_page
<
0
)
ppshpage
=
NULL
;
else
ppshpage
=
(
LPCPROPSHEETPAGEW
)
psInfo
->
proppage
[
psInfo
->
active_page
].
hpage
;
ppshpage
=
&
psInfo
->
proppage
[
psInfo
->
active_page
].
hpage
->
psp
;
if
(
(
ppshpage
&&
!
(
ppshpage
->
dwFlags
&
PSP_HIDEHEADER
))
&&
(
psInfo
->
ppshheader
.
dwFlags
&
(
PSH_WIZARD97_OLD
|
PSH_WIZARD97_NEW
))
&&
...
...
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