Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
9fcfaaa6
Commit
9fcfaaa6
authored
Mar 28, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 31, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Support header item image/bitmap in LVSCW_AUTOSIZE_USEHEADER case.
parent
961c7b88
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
4 deletions
+23
-4
listview.c
dlls/comctl32/listview.c
+23
-4
No files found.
dlls/comctl32/listview.c
View file @
9fcfaaa6
...
...
@@ -6,7 +6,7 @@
* Copyright 2000 Jason Mawdsley
* Copyright 2001 CodeWeavers Inc.
* Copyright 2002 Dimitrie O. Paun
* Copyright 2009-201
4
Nikolay Sivov
* Copyright 2009-201
5
Nikolay Sivov
* Copyright 2009 Owen Rudge for CodeWeavers
* Copyright 2012-2013 Daniel Jelinski
*
...
...
@@ -54,7 +54,6 @@
* -- Support CustomDraw options for _WIN32_IE >= 0x560 (see NMLVCUSTOMDRAW docs).
* -- LVA_SNAPTOGRID not implemented
* -- LISTVIEW_ApproximateViewRect partially implemented
* -- LISTVIEW_SetColumnWidth ignores header images & bitmap
* -- LISTVIEW_StyleChanged doesn't handle some changes too well
*
* Speedups
...
...
@@ -8402,18 +8401,38 @@ static BOOL LISTVIEW_SetColumnWidth(LISTVIEW_INFO *infoPtr, INT nColumn, INT cx)
cx
=
0
;
/* retrieve header text */
hdi
.
mask
=
HDI_TEXT
;
hdi
.
mask
=
HDI_TEXT
|
HDI_FORMAT
|
HDI_IMAGE
|
HDI_BITMAP
;
hdi
.
cchTextMax
=
DISP_TEXT_SIZE
;
hdi
.
pszText
=
szDispText
;
if
(
SendMessageW
(
infoPtr
->
hwndHeader
,
HDM_GETITEMW
,
nColumn
,
(
LPARAM
)
&
hdi
))
{
HDC
hdc
=
GetDC
(
infoPtr
->
hwndSelf
);
HFONT
old_font
=
SelectObject
(
hdc
,
(
HFONT
)
SendMessageW
(
infoPtr
->
hwndHeader
,
WM_GETFONT
,
0
,
0
));
HIMAGELIST
himl
=
(
HIMAGELIST
)
SendMessageW
(
infoPtr
->
hwndHeader
,
HDM_GETIMAGELIST
,
0
,
0
);
INT
bitmap_margin
=
0
;
SIZE
size
;
if
(
GetTextExtentPoint32W
(
hdc
,
hdi
.
pszText
,
lstrlenW
(
hdi
.
pszText
),
&
size
))
cx
=
size
.
cx
+
TRAILING_HEADER_PADDING
;
/* FIXME: Take into account the header image, if one is present */
if
(
hdi
.
fmt
&
(
HDF_IMAGE
|
HDF_BITMAP
))
bitmap_margin
=
SendMessageW
(
infoPtr
->
hwndHeader
,
HDM_GETBITMAPMARGIN
,
0
,
0
);
if
((
hdi
.
fmt
&
HDF_IMAGE
)
&&
himl
)
{
INT
icon_cx
,
icon_cy
;
if
(
!
ImageList_GetIconSize
(
himl
,
&
icon_cx
,
&
icon_cy
))
cx
+=
icon_cx
+
2
*
bitmap_margin
;
}
else
if
(
hdi
.
fmt
&
HDF_BITMAP
)
{
BITMAP
bmp
;
GetObjectW
(
hdi
.
hbm
,
sizeof
(
BITMAP
),
&
bmp
);
cx
+=
bmp
.
bmWidth
+
2
*
bitmap_margin
;
}
SelectObject
(
hdc
,
old_font
);
ReleaseDC
(
infoPtr
->
hwndSelf
,
hdc
);
}
...
...
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