Implemented VK_PRIOR and VK_NEXT processing (merged from Corel tree).

This commit is contained in:
Aric Stewart 2000-11-08 04:30:16 +00:00 committed by Alexandre Julliard
parent 7ab639862b
commit b1eb301477
1 changed files with 22 additions and 2 deletions

View File

@ -7951,6 +7951,8 @@ static LRESULT LISTVIEW_KeyDown(HWND hwnd, INT nVirtualKey, LONG lKeyData)
NMHDR nmh;
INT nItem = -1;
BOOL bRedraw = FALSE;
LONG lStyle = GetWindowLongA(hwnd, GWL_STYLE);
UINT uView = lStyle & LVS_TYPEMASK;
/* send LVN_KEYDOWN notification */
ZeroMemory(&nmKeyDown, sizeof(NMLVKEYDOWN));
@ -8011,11 +8013,29 @@ static LRESULT LISTVIEW_KeyDown(HWND hwnd, INT nVirtualKey, LONG lKeyData)
break;
case VK_PRIOR:
/* TO DO */
if (uView == LVS_REPORT)
{
nItem = infoPtr->nFocusedItem - LISTVIEW_GetCountPerColumn(hwnd);
}
else
{
nItem = infoPtr->nFocusedItem - LISTVIEW_GetCountPerColumn(hwnd)
* LISTVIEW_GetCountPerRow(hwnd);
}
if(nItem < 0) nItem = 0;
break;
case VK_NEXT:
/* TO DO */
if (uView == LVS_REPORT)
{
nItem = infoPtr->nFocusedItem + LISTVIEW_GetCountPerColumn(hwnd);
}
else
{
nItem = infoPtr->nFocusedItem + LISTVIEW_GetCountPerColumn(hwnd)
* LISTVIEW_GetCountPerRow(hwnd);
}
if(nItem >= GETITEMCOUNT(infoPtr)) nItem = GETITEMCOUNT(infoPtr) - 1;
break;
}