comctl32:listview: Fix bug 1106
Vitaliy Margolen
wine-patch at kievinfo.com
Mon Oct 3 17:06:13 CDT 2005
Fix bug 1106:
http://bugs.winehq.com/show_bug.cgi?id=1106
Vitaliy Margolen
changelog:
comctl32: listview
- Implement selection with [ctrl]+[space] keys
-------------- next part --------------
Index: dlls/comctl32/listview.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/listview.c,v
retrieving revision 1.430
diff -u -p -r1.430 listview.c
--- dlls/comctl32/listview.c 13 Sep 2005 14:30:53 -0000 1.430
+++ dlls/comctl32/listview.c 3 Oct 2005 22:04:19 -0000
@@ -7977,6 +7979,22 @@ static LRESULT LISTVIEW_KeyDown(LISTVIEW
switch (nVirtualKey)
{
+ case VK_SPACE:
+ {
+ INT nItem = infoPtr->nFocusedItem;
+ if ((nItem >= 0) && (nItem < infoPtr->nItemCount))
+ {
+ LVITEMW lvItem;
+
+ lvItem.state = ~LISTVIEW_GetItemState(infoPtr, nItem, LVIS_SELECTED);
+ lvItem.stateMask = LVIS_SELECTED;
+ LISTVIEW_SetItemState(infoPtr, nItem, &lvItem);
+
+ if (lvItem.state & LVIS_SELECTED)
+ infoPtr->nSelectionMark = nItem;
+ }
+ break;
+ }
case VK_RETURN:
if ((infoPtr->nItemCount > 0) && (infoPtr->nFocusedItem != -1))
{
More information about the wine-patches
mailing list