WndProc (Part 13)
By SalimMeghani
- 212 reads
// Translate cursor keys to scroll messages.
case WM_KEYDOWN:
switch(wParam)
{
case VK_UP:
SendMessage(hWnd, WM_VSCROLL, SB_LINEUP,0L);
break;
case VK_DOWN:
SendMessage(hWnd, WM_VSCROLL, SB_LINEDOWN,0L);
break;
case VK_LEFT:
SendMessage(hWnd, WM_HSCROLL, SB_LINEUP,0L);
break;
case VK_RIGHT:
SendMessage(hWnd, WM_HSCROLL, SB_LINEDOWN,0L);
break;
}
break;
- Log in to post comments