Listview column sorting
Duane Clark
dclark at akamail.com
Thu Mar 7 17:44:10 CST 2002
Log message:
Add LVS_NOSORTHEADER support.
Sort column on HDN_ITEMCLICKA too.
-------------- next part --------------
Index: dlls/comctl32/listview.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/listview.c,v
retrieving revision 1.122
diff -u -r1.122 listview.c
--- dlls/comctl32/listview.c 2002/02/28 21:42:25 1.122
+++ dlls/comctl32/listview.c 2002/03/07 23:06:49
@@ -929,9 +934,6 @@
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");
@@ -7971,9 +7974,9 @@
/* 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,
@@ -8770,7 +8773,7 @@
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;
More information about the wine-patches
mailing list