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
e270a104
Commit
e270a104
authored
Sep 26, 2022
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Add helper for getting template from HPROPSHEETPAGE.
parent
a3b1a9cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
propsheet.c
dlls/comctl32/propsheet.c
+15
-7
No files found.
dlls/comctl32/propsheet.c
View file @
e270a104
...
...
@@ -416,6 +416,11 @@ static HICON HPSP_get_icon(HPROPSHEETPAGE hpsp)
return
ret
;
}
static
LRESULT
HPSP_get_template
(
HPROPSHEETPAGE
hpsp
)
{
return
(
LRESULT
)
hpsp
->
psp
.
u
.
pszTemplate
;
}
static
HWND
HPSP_create_page
(
HPROPSHEETPAGE
hpsp
,
DLGTEMPLATE
*
template
,
HWND
parent
)
{
HWND
hwnd
;
...
...
@@ -517,7 +522,7 @@ static INT PROPSHEET_FindPageByResId(const PropSheetInfo * psInfo, LRESULT resId
for
(
i
=
0
;
i
<
psInfo
->
nPages
;
i
++
)
{
/* Fixme: if resource ID is a string shall we use strcmp ??? */
if
(
psInfo
->
proppage
[
i
].
hpage
->
psp
.
u
.
pszTemplate
==
(
LPVOID
)
resId
)
if
(
HPSP_get_template
(
psInfo
->
proppage
[
i
].
hpage
)
==
resId
)
break
;
}
...
...
@@ -2624,7 +2629,7 @@ static LRESULT PROPSHEET_IdToIndex(HWND hwndDlg, int iPageId)
PropSheetInfo
*
psInfo
=
GetPropW
(
hwndDlg
,
PropSheetInfoStr
);
TRACE
(
"(%p, %d)
\n
"
,
hwndDlg
,
iPageId
);
for
(
index
=
0
;
index
<
psInfo
->
nPages
;
index
++
)
{
if
(
psInfo
->
proppage
[
index
].
hpage
->
psp
.
u
.
pszTemplate
==
MAKEINTRESOURCEW
(
iPageId
)
)
if
(
HPSP_get_template
(
psInfo
->
proppage
[
index
].
hpage
)
==
iPageId
)
return
index
;
}
...
...
@@ -2637,17 +2642,20 @@ static LRESULT PROPSHEET_IdToIndex(HWND hwndDlg, int iPageId)
static
LRESULT
PROPSHEET_IndexToId
(
HWND
hwndDlg
,
int
iPageIndex
)
{
PropSheetInfo
*
psInfo
=
GetPropW
(
hwndDlg
,
PropSheetInfoStr
);
LPCPROPSHEETPAGEW
psp
;
HPROPSHEETPAGE
hpsp
;
LRESULT
template
;
TRACE
(
"(%p, %d)
\n
"
,
hwndDlg
,
iPageIndex
);
if
(
iPageIndex
<
0
||
iPageIndex
>=
psInfo
->
nPages
)
{
WARN
(
"%d out of range.
\n
"
,
iPageIndex
);
return
0
;
}
psp
=
&
psInfo
->
proppage
[
iPageIndex
].
hpage
->
psp
;
if
(
psp
->
dwFlags
&
PSP_DLGINDIRECT
||
!
IS_INTRESOURCE
(
psp
->
u
.
pszTemplate
))
{
hpsp
=
psInfo
->
proppage
[
iPageIndex
].
hpage
;
template
=
HPSP_get_template
(
hpsp
);
if
(
HPSP_get_flags
(
hpsp
)
&
PSP_DLGINDIRECT
||
!
IS_INTRESOURCE
(
template
))
return
0
;
}
return
(
LRESULT
)
psp
->
u
.
pszTemplate
;
return
template
;
}
/******************************************************************************
...
...
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