Authors: Chris Morgan <cmorgan@wpi.edu>, James Abbatiello <abbeyj@wpi.edu>

LISTVIEW_KeyDown: Invalidate the listview window only when the
selected item changes.
oldstable
Alexandre Julliard 1999-05-23 09:24:13 +00:00
parent d30821a0ff
commit dead0e1da0
1 changed files with 4 additions and 2 deletions

View File

@ -5548,6 +5548,7 @@ static LRESULT LISTVIEW_KeyDown(HWND hwnd, INT nVirtualKey, LONG lKeyData)
HWND hwndParent = GetParent(hwnd);
NMLVKEYDOWN nmKeyDown;
NMHDR nmh;
INT oldFocusedItem = infoPtr->nFocusedItem;
/* send LVN_KEYDOWN notification */
ZeroMemory(&nmKeyDown, sizeof(NMLVKEYDOWN));
@ -5736,8 +5737,9 @@ static LRESULT LISTVIEW_KeyDown(HWND hwnd, INT nVirtualKey, LONG lKeyData)
break;
}
/* refresh client area */
InvalidateRect(hwnd, NULL, TRUE);
/* refresh client area if necessary*/
if(oldFocusedItem != infoPtr->nFocusedItem)
InvalidateRect(hwnd, NULL, TRUE);
return 0;
}