Commit b1eb3014 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

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

parent 7ab63986
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment