Isolated vertical scroll messages with the other vertical scroll code.

This commit is contained in:
Pietro Gagliardi 2014-12-01 15:34:26 -05:00
parent 16a88c548b
commit 6b2c295fdc
2 changed files with 16 additions and 6 deletions

View File

@ -104,6 +104,7 @@ struct table {
typedef BOOL (*handlerfunc)(struct table *, UINT, WPARAM, LPARAM, LRESULT *); typedef BOOL (*handlerfunc)(struct table *, UINT, WPARAM, LPARAM, LRESULT *);
const handlerfunc handlerfuncs[] = { const handlerfunc handlerfuncs[] = {
vscrollHandler,
APIHandler, APIHandler,
NULL, NULL,
}; };
@ -175,12 +176,6 @@ if (ImageList_GetIconSize(t->imagelist, &unused, &(t->imagelistHeight)) == 0)abo
drawItems(t, dc, ps.rcPaint); drawItems(t, dc, ps.rcPaint);
EndPaint(hwnd, &ps); EndPaint(hwnd, &ps);
return 0; return 0;
case WM_VSCROLL:
vscroll(t, wParam);
return 0;
case WM_MOUSEWHEEL:
wheelscroll(t, wParam);
return 0;
case WM_HSCROLL: case WM_HSCROLL:
hscroll(t, wParam); hscroll(t, wParam);
return 0; return 0;

View File

@ -95,3 +95,18 @@ static void vscroll(struct table *t, WPARAM wParam)
vscrollto(t, newpos); vscrollto(t, newpos);
} }
HANDLER(vscroll)
{
switch (uMsg) {
case WM_VSCROLL:
vscroll(t, wParam);
*lResult = 0;
return TRUE;
case WM_MOUSEWHEEL:
wheelscroll(t, wParam);
*lResult = 0;
return TRUE;
}
return FALSE;
}