diff options
| author | Pietro Gagliardi <[email protected]> | 2015-01-08 01:55:45 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2015-01-08 01:55:45 -0500 |
| commit | ce64650aadf1f7dd751a1f753dff920ba1652edf (patch) | |
| tree | a4fdecd9310e2a74ab54cc53eef3cfc308d7efaa /wintable/api.h | |
| parent | 592ae7a987d2b795c5f508a17520b313f8d17481 (diff) | |
Added updateAll() and resolved WM_SETFONT to begin the final reasoning-through of update().
Diffstat (limited to 'wintable/api.h')
| -rw-r--r-- | wintable/api.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/wintable/api.h b/wintable/api.h index 3d36379..f6895e5 100644 --- a/wintable/api.h +++ b/wintable/api.h @@ -15,22 +15,17 @@ static void addColumn(struct table *t, WPARAM wParam, LPARAM lParam) HANDLER(apiHandlers) { intptr_t *rcp; - BOOL tfbool; switch (uMsg) { case WM_SETFONT: // don't free the old font; see http://blogs.msdn.com/b/oldnewthing/archive/2008/09/12/8945692.aspx t->font = (HFONT) wParam; SendMessageW(t->header, WM_SETFONT, wParam, lParam); - // let's ensure the values are strictly TRUE and FALSE just to be safe - tfbool = FALSE; + // if we redraw, we have to redraw ALL of it; after all, the font changed! if (LOWORD(lParam) != FALSE) - tfbool = TRUE; - update(t, tfbool); - // TODO is this needed? - if (tfbool != FALSE) - // TODO check error - InvalidateRect(t->hwnd, NULL, TRUE); + updateAll(t); // DONE + else + update(t, FALSE); // DONE *lResult = 0; return TRUE; case WM_GETFONT: |
