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
f4dd14ab
Commit
f4dd14ab
authored
Jun 26, 2007
by
Lei Zhang
Committed by
Alexandre Julliard
Jun 26, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Reduce duplicate code between PROPSHEET_CollectSheetInfoA/W.
parent
0cbee494
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
30 deletions
+25
-30
propsheet.c
dlls/comctl32/propsheet.c
+25
-30
No files found.
dlls/comctl32/propsheet.c
View file @
f4dd14ab
...
...
@@ -286,29 +286,44 @@ static void PROPSHEET_AtoW(LPCWSTR *tostr, LPCSTR frstr)
}
/******************************************************************************
* PROPSHEET_CollectSheetInfoCommon
*
* Common code for PROPSHEET_CollectSheetInfoA/W
*/
static
void
PROPSHEET_CollectSheetInfoCommon
(
PropSheetInfo
*
psInfo
,
DWORD
dwFlags
)
{
PROPSHEET_UnImplementedFlags
(
dwFlags
);
psInfo
->
hasHelp
=
dwFlags
&
PSH_HASHELP
;
psInfo
->
hasApply
=
!
(
dwFlags
&
PSH_NOAPPLYNOW
);
psInfo
->
hasFinish
=
dwFlags
&
PSH_WIZARDHASFINISH
;
psInfo
->
isModeless
=
dwFlags
&
PSH_MODELESS
;
if
(
psInfo
->
active_page
<
0
||
psInfo
->
active_page
>=
psInfo
->
nPages
)
psInfo
->
active_page
=
0
;
psInfo
->
result
=
0
;
psInfo
->
hImageList
=
0
;
psInfo
->
activeValid
=
FALSE
;
}
/******************************************************************************
* PROPSHEET_CollectSheetInfoA
*
* Collect relevant data.
*/
static
BOOL
PROPSHEET_CollectSheetInfoA
(
LPCPROPSHEETHEADERA
lppsh
,
static
void
PROPSHEET_CollectSheetInfoA
(
LPCPROPSHEETHEADERA
lppsh
,
PropSheetInfo
*
psInfo
)
{
DWORD
dwSize
=
min
(
lppsh
->
dwSize
,
sizeof
(
PROPSHEETHEADERA
));
DWORD
dwFlags
=
lppsh
->
dwFlags
;
psInfo
->
hasHelp
=
dwFlags
&
PSH_HASHELP
;
psInfo
->
hasApply
=
!
(
dwFlags
&
PSH_NOAPPLYNOW
);
psInfo
->
hasFinish
=
dwFlags
&
PSH_WIZARDHASFINISH
;
psInfo
->
useCallback
=
(
dwFlags
&
PSH_USECALLBACK
)
&&
(
lppsh
->
pfnCallback
);
psInfo
->
isModeless
=
dwFlags
&
PSH_MODELESS
;
memcpy
(
&
psInfo
->
ppshheader
,
lppsh
,
dwSize
);
TRACE
(
"
\n
** PROPSHEETHEADER **
\n
dwSize
\t\t
%d
\n
dwFlags
\t\t
%08x
\n
hwndParent
\t
%p
\n
hInstance
\t
%p
\n
pszCaption
\t
'%s'
\n
nPages
\t\t
%d
\n
pfnCallback
\t
%p
\n
"
,
lppsh
->
dwSize
,
lppsh
->
dwFlags
,
lppsh
->
hwndParent
,
lppsh
->
hInstance
,
debugstr_a
(
lppsh
->
pszCaption
),
lppsh
->
nPages
,
lppsh
->
pfnCallback
);
PROPSHEET_UnImplementedFlags
(
lppsh
->
dwFlags
);
if
(
lppsh
->
dwFlags
&
INTRNL_ANY_WIZARD
)
psInfo
->
ppshheader
.
pszCaption
=
NULL
;
else
...
...
@@ -332,14 +347,7 @@ static BOOL PROPSHEET_CollectSheetInfoA(LPCPROPSHEETHEADERA lppsh,
else
psInfo
->
active_page
=
lppsh
->
u2
.
nStartPage
;
if
(
psInfo
->
active_page
<
0
||
psInfo
->
active_page
>=
psInfo
->
nPages
)
psInfo
->
active_page
=
0
;
psInfo
->
result
=
0
;
psInfo
->
hImageList
=
0
;
psInfo
->
activeValid
=
FALSE
;
return
TRUE
;
PROPSHEET_CollectSheetInfoCommon
(
psInfo
,
dwFlags
);
}
/******************************************************************************
...
...
@@ -347,24 +355,18 @@ static BOOL PROPSHEET_CollectSheetInfoA(LPCPROPSHEETHEADERA lppsh,
*
* Collect relevant data.
*/
static
BOOL
PROPSHEET_CollectSheetInfoW
(
LPCPROPSHEETHEADERW
lppsh
,
static
void
PROPSHEET_CollectSheetInfoW
(
LPCPROPSHEETHEADERW
lppsh
,
PropSheetInfo
*
psInfo
)
{
DWORD
dwSize
=
min
(
lppsh
->
dwSize
,
sizeof
(
PROPSHEETHEADERW
));
DWORD
dwFlags
=
lppsh
->
dwFlags
;
psInfo
->
hasHelp
=
dwFlags
&
PSH_HASHELP
;
psInfo
->
hasApply
=
!
(
dwFlags
&
PSH_NOAPPLYNOW
);
psInfo
->
hasFinish
=
dwFlags
&
PSH_WIZARDHASFINISH
;
psInfo
->
useCallback
=
(
dwFlags
&
PSH_USECALLBACK
)
&&
(
lppsh
->
pfnCallback
);
psInfo
->
isModeless
=
dwFlags
&
PSH_MODELESS
;
memcpy
(
&
psInfo
->
ppshheader
,
lppsh
,
dwSize
);
TRACE
(
"
\n
** PROPSHEETHEADER **
\n
dwSize
\t\t
%d
\n
dwFlags
\t\t
%08x
\n
hwndParent
\t
%p
\n
hInstance
\t
%p
\n
pszCaption
\t
%s
\n
nPages
\t\t
%d
\n
pfnCallback
\t
%p
\n
"
,
lppsh
->
dwSize
,
lppsh
->
dwFlags
,
lppsh
->
hwndParent
,
lppsh
->
hInstance
,
debugstr_w
(
lppsh
->
pszCaption
),
lppsh
->
nPages
,
lppsh
->
pfnCallback
);
PROPSHEET_UnImplementedFlags
(
lppsh
->
dwFlags
);
if
(
lppsh
->
dwFlags
&
INTRNL_ANY_WIZARD
)
psInfo
->
ppshheader
.
pszCaption
=
NULL
;
else
...
...
@@ -387,14 +389,7 @@ static BOOL PROPSHEET_CollectSheetInfoW(LPCPROPSHEETHEADERW lppsh,
else
psInfo
->
active_page
=
lppsh
->
u2
.
nStartPage
;
if
(
psInfo
->
active_page
<
0
||
psInfo
->
active_page
>=
psInfo
->
nPages
)
psInfo
->
active_page
=
0
;
psInfo
->
result
=
0
;
psInfo
->
hImageList
=
0
;
psInfo
->
activeValid
=
FALSE
;
return
TRUE
;
PROPSHEET_CollectSheetInfoCommon
(
psInfo
,
dwFlags
);
}
/******************************************************************************
...
...
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