More Windows Table work.
This commit is contained in:
parent
bb28a02b15
commit
5b904dfa94
|
@ -112,3 +112,14 @@ static void recomputeHScroll(struct table *t)
|
||||||
si.nMax = t->width - 1; // - 1 because endpoints inclusive
|
si.nMax = t->width - 1; // - 1 because endpoints inclusive
|
||||||
SetScrollInfo(t->hwnd, SB_HORZ, &si, TRUE);
|
SetScrollInfo(t->hwnd, SB_HORZ, &si, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HANDLER(hscroll)
|
||||||
|
{
|
||||||
|
switch (uMsg) {
|
||||||
|
case WM_HSCROLL:
|
||||||
|
hscroll(t, wParam);
|
||||||
|
*lResult = 0;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
|
@ -105,6 +105,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[] = {
|
||||||
|
hscrollHandler,
|
||||||
vscrollHandler,
|
vscrollHandler,
|
||||||
APIHandler,
|
APIHandler,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -177,9 +178,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_HSCROLL:
|
|
||||||
hscroll(t, wParam);
|
|
||||||
return 0;
|
|
||||||
case WM_SIZE:
|
case WM_SIZE:
|
||||||
resize(t);
|
resize(t);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -190,6 +188,7 @@ if (ImageList_GetIconSize(t->imagelist, &unused, &(t->imagelistHeight)) == 0)abo
|
||||||
case WM_KILLFOCUS:
|
case WM_KILLFOCUS:
|
||||||
// all we need to do here is redraw the highlight
|
// all we need to do here is redraw the highlight
|
||||||
// TODO ensure giving focus works right
|
// TODO ensure giving focus works right
|
||||||
|
// TODO figure out hwat I meant by this
|
||||||
redrawRow(t, t->selected);
|
redrawRow(t, t->selected);
|
||||||
return 0;
|
return 0;
|
||||||
case WM_KEYDOWN:
|
case WM_KEYDOWN:
|
||||||
|
|
Loading…
Reference in New Issue