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
9a171b8e
Commit
9a171b8e
authored
May 19, 2000
by
Chris Morgan
Committed by
Alexandre Julliard
May 19, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update nItemWidth in LISTVIEW_SetItem() if LVS_LIST or LVS_SMALLICON
mode and item text is wider than the current nItemWidth.
parent
f2f0927e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
listview.c
dlls/comctl32/listview.c
+15
-1
No files found.
dlls/comctl32/listview.c
View file @
9a171b8e
...
...
@@ -138,6 +138,7 @@ static HWND LISTVIEW_EditLabelA(HWND hwnd, INT nItem);
static
BOOL
LISTVIEW_EndEditLabel
(
HWND
hwnd
,
LPSTR
pszText
,
DWORD
nItem
);
static
LRESULT
LISTVIEW_Command
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
);
static
LRESULT
LISTVIEW_SortItems
(
HWND
hwnd
,
WPARAM
wParam
,
LPARAM
lParam
);
static
LRESULT
LISTVIEW_GetStringWidthA
(
HWND
hwnd
,
LPCSTR
lpszText
);
/*************************************************************************
* LISTVIEW_UpdateHeaderSize [Internal]
...
...
@@ -1652,8 +1653,11 @@ static BOOL LISTVIEW_SetItem(HWND hwnd, LPLVITEMA lpLVItem)
HDPA
hdpaSubItems
;
LISTVIEW_ITEM
*
lpItem
;
NMLISTVIEW
nmlv
;
UINT
uChanged
;
LONG
lCtrlId
=
GetWindowLongA
(
hwnd
,
GWL_ID
);
LONG
lStyle
=
GetWindowLongA
(
hwnd
,
GWL_STYLE
);
UINT
uChanged
;
UINT
uView
=
lStyle
&
LVS_TYPEMASK
;
INT
item_width
;
if
(
lpLVItem
!=
NULL
)
{
...
...
@@ -1688,6 +1692,16 @@ static BOOL LISTVIEW_SetItem(HWND hwnd, LPLVITEMA lpLVItem)
/* copy information */
bResult
=
LISTVIEW_InitItem
(
hwnd
,
lpItem
,
lpLVItem
);
/* if LVS_LIST or LVS_SMALLICON, update the width of the items based on */
/* the width of the items text */
if
((
uView
==
LVS_LIST
)
||
(
uView
==
LVS_SMALLICON
))
{
item_width
=
LISTVIEW_GetStringWidthA
(
hwnd
,
lpItem
->
pszText
);
if
(
item_width
>
infoPtr
->
nItemWidth
)
infoPtr
->
nItemWidth
=
item_width
;
}
/* send LVN_ITEMCHANGED notification */
nmlv
.
hdr
.
code
=
LVN_ITEMCHANGED
;
ListView_LVNotify
(
GetParent
(
hwnd
),
lCtrlId
,
&
nmlv
);
...
...
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