Minor correctness, consistency, and predictability changes.
This commit is contained in:
parent
1dcdcd522c
commit
592ae7a987
|
@ -15,15 +15,20 @@ static void addColumn(struct table *t, WPARAM wParam, LPARAM lParam)
|
||||||
HANDLER(apiHandlers)
|
HANDLER(apiHandlers)
|
||||||
{
|
{
|
||||||
intptr_t *rcp;
|
intptr_t *rcp;
|
||||||
|
BOOL tfbool;
|
||||||
|
|
||||||
switch (uMsg) {
|
switch (uMsg) {
|
||||||
case WM_SETFONT:
|
case WM_SETFONT:
|
||||||
// don't free the old font; see http://blogs.msdn.com/b/oldnewthing/archive/2008/09/12/8945692.aspx
|
// don't free the old font; see http://blogs.msdn.com/b/oldnewthing/archive/2008/09/12/8945692.aspx
|
||||||
t->font = (HFONT) wParam;
|
t->font = (HFONT) wParam;
|
||||||
SendMessageW(t->header, WM_SETFONT, wParam, lParam);
|
SendMessageW(t->header, WM_SETFONT, wParam, lParam);
|
||||||
update(t, LOWORD(lParam) != FALSE);
|
// let's ensure the values are strictly TRUE and FALSE just to be safe
|
||||||
// TODO is this needed?
|
tfbool = FALSE;
|
||||||
if (LOWORD(lParam) != FALSE)
|
if (LOWORD(lParam) != FALSE)
|
||||||
|
tfbool = TRUE;
|
||||||
|
update(t, tfbool);
|
||||||
|
// TODO is this needed?
|
||||||
|
if (tfbool != FALSE)
|
||||||
// TODO check error
|
// TODO check error
|
||||||
InvalidateRect(t->hwnd, NULL, TRUE);
|
InvalidateRect(t->hwnd, NULL, TRUE);
|
||||||
*lResult = 0;
|
*lResult = 0;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
// The control font changing is the big one, as that comes with a flag that decides whether or not to redraw everything. We'll need to respect that here.
|
// The control font changing is the big one, as that comes with a flag that decides whether or not to redraw everything. We'll need to respect that here.
|
||||||
|
|
||||||
// TODO actually use redraw here
|
// TODO actually use redraw here
|
||||||
static void update(struct table *t, int redraw)
|
static void update(struct table *t, BOOL redraw)
|
||||||
{
|
{
|
||||||
RECT client;
|
RECT client;
|
||||||
intptr_t i;
|
intptr_t i;
|
||||||
|
|
Loading…
Reference in New Issue