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
85411af6
Commit
85411af6
authored
Aug 14, 1999
by
Thuy Nguyen
Committed by
Alexandre Julliard
Aug 14, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for icons in property sheet tabs.
parent
fbde5be2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
propsheet.c
dlls/comctl32/propsheet.c
+37
-0
No files found.
dlls/comctl32/propsheet.c
View file @
85411af6
...
...
@@ -59,6 +59,7 @@ typedef struct tagPropSheetInfo
int
y
;
int
width
;
int
height
;
HIMAGELIST
hImageList
;
}
PropSheetInfo
;
typedef
struct
...
...
@@ -152,6 +153,7 @@ static BOOL PROPSHEET_CollectSheetInfo(LPCPROPSHEETHEADERA lppsh,
psInfo
->
restartWindows
=
FALSE
;
psInfo
->
rebootSystem
=
FALSE
;
psInfo
->
hImageList
=
0
;
return
TRUE
;
}
...
...
@@ -271,6 +273,27 @@ BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEA lppsp,
TRACE
(
"Tab %d %s
\n
"
,
index
,
debugstr_w
((
LPCWSTR
)
p
));
p
+=
lstrlenW
((
LPCWSTR
)
p
)
+
1
;
/*
* Build the image list for icons
*/
if
((
dwFlags
&
PSP_USEHICON
)
||
(
dwFlags
&
PSP_USEICONID
))
{
HICON
hIcon
;
int
icon_cx
=
GetSystemMetrics
(
SM_CXSMICON
);
int
icon_cy
=
GetSystemMetrics
(
SM_CYSMICON
);
if
(
dwFlags
&
PSP_USEICONID
)
hIcon
=
LoadImageA
(
lppsp
->
hInstance
,
lppsp
->
u2
.
pszIcon
,
IMAGE_ICON
,
icon_cx
,
icon_cy
,
LR_DEFAULTCOLOR
);
else
hIcon
=
lppsp
->
u2
.
hIcon
;
if
(
psInfo
->
hImageList
==
0
)
psInfo
->
hImageList
=
ImageList_Create
(
icon_cx
,
icon_cy
,
ILC_COLOR
,
1
,
1
);
ImageList_AddIcon
(
psInfo
->
hImageList
,
hIcon
);
}
return
TRUE
;
}
...
...
@@ -546,8 +569,19 @@ static BOOL PROPSHEET_CreateTabControl(HWND hwndParent,
nTabs
=
psInfo
->
ppshheader
->
nPages
;
/*
* Set the image list for icons.
*/
if
(
psInfo
->
hImageList
)
{
item
.
mask
|=
TCIF_IMAGE
;
SendMessageA
(
hwndTabCtrl
,
TCM_SETIMAGELIST
,
0
,
(
LPARAM
)
psInfo
->
hImageList
);
}
for
(
i
=
0
;
i
<
nTabs
;
i
++
)
{
item
.
iImage
=
i
;
WideCharToMultiByte
(
CP_ACP
,
0
,
(
LPCWSTR
)
psInfo
->
proppage
[
i
].
pszText
,
-
1
,
tabtext
,
MAX_TABTEXT_LENGTH
,
NULL
,
NULL
);
...
...
@@ -1159,8 +1193,11 @@ static void PROPSHEET_CleanUp(HWND hwndDlg)
{
PropSheetInfo
*
psInfo
=
(
PropSheetInfo
*
)
RemovePropA
(
hwndDlg
,
PropSheetInfoStr
);
TRACE
(
"
\n
"
);
COMCTL32_Free
(
psInfo
->
proppage
);
COMCTL32_Free
(
psInfo
->
strPropertiesFor
);
ImageList_Destroy
(
psInfo
->
hImageList
);
GlobalFree
((
HGLOBAL
)
psInfo
);
}
...
...
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