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
b7d81995
Commit
b7d81995
authored
Mar 20, 2002
by
Duane Clark
Committed by
Alexandre Julliard
Mar 20, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add LVS_NOSORTHEADER support.
Sort column on HDN_ITEMCLICKA too. Do not edit labels if icon was clicked. Fix the incorrect icon width in my earlier patch.
parent
44f1a98c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
14 deletions
+7
-14
listview.c
dlls/comctl32/listview.c
+7
-14
No files found.
dlls/comctl32/listview.c
View file @
b7d81995
...
...
@@ -944,9 +944,6 @@ static VOID LISTVIEW_UnsupportedStyles(LONG lStyle)
if
((
LVS_TYPESTYLEMASK
&
lStyle
)
==
LVS_NOSCROLL
)
FIXME
(
" LVS_NOSCROLL
\n
"
);
if
((
LVS_TYPESTYLEMASK
&
lStyle
)
==
LVS_NOSORTHEADER
)
FIXME
(
" LVS_NOSORTHEADER
\n
"
);
if
(
lStyle
&
LVS_EDITLABELS
)
FIXME
(
" LVS_EDITLABELS
\n
"
);
...
...
@@ -7217,10 +7214,8 @@ static LRESULT LISTVIEW_SetColumnWidth(HWND hwnd, INT iCol, INT cx)
nLabelWidth
=
LISTVIEW_GetLabelWidth
(
hwnd
,
item_index
);
cx
=
(
nLabelWidth
>
cx
)
?
nLabelWidth
:
cx
;
}
/* I had to add the '3' to prevent clipping of the end of the
line. Probably one of these padding numbers is incorrect. */
if
(
infoPtr
->
himlSmall
)
cx
+=
WIDTH_PADDING
+
IMAGE_PADDING
+
3
;
cx
+=
infoPtr
->
iconSize
.
cx
+
IMAGE_PADDING
;
}
else
{
...
...
@@ -7306,9 +7301,7 @@ static LRESULT LISTVIEW_SetColumnWidth(HWND hwnd, INT iCol, INT cx)
up the positioning, so I suspect no applications actually use
them. */
if
(
item_index
==
0
&&
infoPtr
->
himlSmall
)
/* I had to add the '3' to prevent clipping of the end of the
line. Probably one of these padding numbers is incorrect. */
nLabelWidth
+=
WIDTH_PADDING
+
IMAGE_PADDING
+
3
;
nLabelWidth
+=
infoPtr
->
iconSize
.
cx
+
IMAGE_PADDING
;
cx
=
(
nLabelWidth
>
cx
)
?
nLabelWidth
:
cx
;
}
}
...
...
@@ -8005,9 +7998,9 @@ static LRESULT LISTVIEW_Create(HWND hwnd, LPCREATESTRUCTW lpcs)
/* create header */
infoPtr
->
hwndHeader
=
CreateWindowW
(
WC_HEADERW
,
(
LPCWSTR
)
NULL
,
WS_CHILD
|
HDS_HORZ
|
HDS_BUTTONS
,
0
,
0
,
0
,
0
,
hwnd
,
(
HMENU
)
0
,
lpcs
->
hInstance
,
NULL
);
WS_CHILD
|
HDS_HORZ
|
(
DWORD
)((
LVS_NOSORTHEADER
&
lpcs
->
style
)
?
0
:
HDS_BUTTONS
)
,
0
,
0
,
0
,
0
,
hwnd
,
(
HMENU
)
0
,
lpcs
->
hInstance
,
NULL
);
/* set header font */
SendMessageW
(
infoPtr
->
hwndHeader
,
WM_SETFONT
,
(
WPARAM
)
infoPtr
->
hFont
,
...
...
@@ -8696,7 +8689,7 @@ static LRESULT LISTVIEW_LButtonUp(HWND hwnd, WORD wKey, WORD wPosX,
if
(
infoPtr
->
nEditLabelItem
!=
-
1
)
{
if
(
lvHitTestInfo
.
iItem
==
infoPtr
->
nEditLabelItem
)
if
(
lvHitTestInfo
.
iItem
==
infoPtr
->
nEditLabelItem
&&
lvHitTestInfo
.
flags
&
LVHT_ONITEMLABEL
)
LISTVIEW_EditLabelT
(
hwnd
,
lvHitTestInfo
.
iItem
,
TRUE
);
infoPtr
->
nEditLabelItem
=
-
1
;
}
...
...
@@ -8804,7 +8797,7 @@ static LRESULT LISTVIEW_Notify(HWND hwnd, INT nCtrlId, LPNMHDR lpnmh)
infoPtr
->
nItemWidth
=
LISTVIEW_GetItemWidth
(
hwnd
);
InvalidateRect
(
hwnd
,
NULL
,
TRUE
);
}
else
if
(
lpnmh
->
code
==
HDN_ITEMCLICKW
)
else
if
(
lpnmh
->
code
==
HDN_ITEMCLICKW
||
lpnmh
->
code
==
HDN_ITEMCLICKA
)
{
/* Handle sorting by Header Column */
NMLISTVIEW
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