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
a1b55be6
Commit
a1b55be6
authored
Jun 04, 2007
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
Jun 04, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: listview: Make LVM_GETCOLUMNWIDTH query the header control instead of using cached data.
parent
f83b53c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
listview.c
dlls/comctl32/listview.c
+14
-4
No files found.
dlls/comctl32/listview.c
View file @
a1b55be6
...
...
@@ -5147,7 +5147,7 @@ static BOOL LISTVIEW_GetColumnOrderArray(const LISTVIEW_INFO *infoPtr, INT iCoun
static
INT
LISTVIEW_GetColumnWidth
(
const
LISTVIEW_INFO
*
infoPtr
,
INT
nColumn
)
{
INT
nColumnWidth
=
0
;
RECT
rcHeader
;
HDITEMW
hdItem
;
TRACE
(
"nColumn=%d
\n
"
,
nColumn
);
...
...
@@ -5158,9 +5158,19 @@ static INT LISTVIEW_GetColumnWidth(const LISTVIEW_INFO *infoPtr, INT nColumn)
nColumnWidth
=
infoPtr
->
nItemWidth
;
break
;
case
LVS_REPORT
:
if
(
nColumn
<
0
||
nColumn
>=
DPA_GetPtrCount
(
infoPtr
->
hdpaColumns
))
return
0
;
LISTVIEW_GetHeaderRect
(
infoPtr
,
nColumn
,
&
rcHeader
);
nColumnWidth
=
rcHeader
.
right
-
rcHeader
.
left
;
/* We are not using LISTVIEW_GetHeaderRect as this data is updated only after a HDM_ITEMCHANGED.
* There is an application that subclasses the listview, calls LVM_GETCOLUMNWIDTH in the
* HDM_ITEMCHANGED handler and goes into infinite recursion if it receives old data.
*
* TODO: should we do the same in LVM_GETCOLUMN?
*/
hdItem
.
mask
=
HDI_WIDTH
;
if
(
!
SendMessageW
(
infoPtr
->
hwndHeader
,
HDM_GETITEMW
,
nColumn
,
(
LPARAM
)
&
hdItem
))
{
WARN
(
"(%p): HDM_GETITEMW failed for item %d
\n
"
,
infoPtr
->
hwndSelf
,
nColumn
);
return
0
;
}
nColumnWidth
=
hdItem
.
cxy
;
break
;
}
...
...
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