summaryrefslogtreecommitdiff
path: root/wintable/api.h
diff options
context:
space:
mode:
Diffstat (limited to 'wintable/api.h')
-rw-r--r--wintable/api.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/wintable/api.h b/wintable/api.h
index 260202e..3d36379 100644
--- a/wintable/api.h
+++ b/wintable/api.h
@@ -15,15 +15,20 @@ 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);
- update(t, LOWORD(lParam) != FALSE);
- // TODO is this needed?
+ // let's ensure the values are strictly TRUE and FALSE just to be safe
+ tfbool = FALSE;
if (LOWORD(lParam) != FALSE)
+ tfbool = TRUE;
+ update(t, tfbool);
+ // TODO is this needed?
+ if (tfbool != FALSE)
// TODO check error
InvalidateRect(t->hwnd, NULL, TRUE);
*lResult = 0;