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
bce73ad5
Commit
bce73ad5
authored
Apr 25, 1999
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Authors: Chris Morgan <cmorgan@wpi.edu>, James Abbatiello <abbeyj@wpi.edu>
Implemented SetColumnWidth for ListView control.
parent
a16a032c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
1 deletion
+53
-1
listview.c
dlls/comctl32/listview.c
+53
-1
No files found.
dlls/comctl32/listview.c
View file @
bce73ad5
...
...
@@ -4671,6 +4671,55 @@ static LRESULT LISTVIEW_SetColumnA(HWND hwnd, INT nColumn,
/***
* DESCRIPTION:
* Sets the width of a column
*
* PARAMETERS:
* [I] HWND : window handle
* [I] INT : column index
* [I] INT : column width
*
* RETURN:
* SUCCESS : TRUE
* FAILURE : FALSE
*/
static
LRESULT
LISTVIEW_SetColumnWidth
(
HWND
hwnd
,
INT
iCol
,
INT
cx
)
{
LISTVIEW_INFO
*
infoPtr
;
HDITEMA
hdi
;
LRESULT
lret
;
LONG
lStyle
;
// set column width only if in report mode
lStyle
=
GetWindowLongA
(
hwnd
,
GWL_STYLE
);
if
((
lStyle
&
LVS_TYPEMASK
)
!=
LVS_REPORT
)
return
(
FALSE
);
// make sure we can get the listview info
if
(
!
(
infoPtr
=
(
LISTVIEW_INFO
*
)
GetWindowLongA
(
hwnd
,
0
)))
return
(
FALSE
);
if
(
!
infoPtr
->
hwndHeader
)
// make sure we have a header
return
(
FALSE
);
// FIXME: currently ignoring LVSCW_AUTOSIZE (-1) and
// LVSCV_AUTOSIZE_USEHEADER (-2)
if
(
cx
<
0
)
return
(
FALSE
);
hdi
.
mask
=
HDI_WIDTH
;
hdi
.
cxy
=
cx
;
// call header to update the column change
lret
=
Header_SetItemA
(
infoPtr
->
hwndHeader
,
(
WPARAM
)
iCol
,
(
LPARAM
)
&
hdi
);
infoPtr
->
nItemWidth
=
LISTVIEW_GetItemWidth
(
hwnd
,
LVS_REPORT
);
InvalidateRect
(
hwnd
,
NULL
,
TRUE
);
// force redraw of the listview
return
lret
;
}
/***
* DESCRIPTION:
* Sets image lists.
*
* PARAMETER(S):
...
...
@@ -6517,7 +6566,10 @@ LRESULT WINAPI LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam,
/* case LVM_SETCOLUMNW: */
/* case LVM_SETCOLUMNORDERARRAY: */
/* case LVM_SETCOLUMNWIDTH: */
case
LVM_SETCOLUMNWIDTH
:
return
LISTVIEW_SetColumnWidth
(
hwnd
,
(
INT
)
wParam
,
(
INT
)
lParam
);
/* case LVM_SETEXTENDEDLISTVIEWSTYLE: */
/* case LVM_SETHOTCURSOR: */
/* case LVM_SETHOTITEM: */
...
...
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