Authors: Chris Morgan <cmorgan@wpi.edu>, James Abbatiello <abbeyj@wpi.edu>
LISTVIEW_KeyDown: Invalidate the listview window only when the selected item changes.
This commit is contained in:
parent
d30821a0ff
commit
dead0e1da0
|
@ -5548,6 +5548,7 @@ static LRESULT LISTVIEW_KeyDown(HWND hwnd, INT nVirtualKey, LONG lKeyData)
|
||||||
HWND hwndParent = GetParent(hwnd);
|
HWND hwndParent = GetParent(hwnd);
|
||||||
NMLVKEYDOWN nmKeyDown;
|
NMLVKEYDOWN nmKeyDown;
|
||||||
NMHDR nmh;
|
NMHDR nmh;
|
||||||
|
INT oldFocusedItem = infoPtr->nFocusedItem;
|
||||||
|
|
||||||
/* send LVN_KEYDOWN notification */
|
/* send LVN_KEYDOWN notification */
|
||||||
ZeroMemory(&nmKeyDown, sizeof(NMLVKEYDOWN));
|
ZeroMemory(&nmKeyDown, sizeof(NMLVKEYDOWN));
|
||||||
|
@ -5736,8 +5737,9 @@ static LRESULT LISTVIEW_KeyDown(HWND hwnd, INT nVirtualKey, LONG lKeyData)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* refresh client area */
|
/* refresh client area if necessary*/
|
||||||
InvalidateRect(hwnd, NULL, TRUE);
|
if(oldFocusedItem != infoPtr->nFocusedItem)
|
||||||
|
InvalidateRect(hwnd, NULL, TRUE);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue