From d7cf4fa7c555c0f34247104c0575ea43d650b948 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Thu, 18 Dec 2014 19:24:32 -0500 Subject: New checkbox plan: because DrawThemeBackground() /might/ do AlphaBlend(), we'll just draw checkboxes on the fly. --- wintable/new/main.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'wintable/new/main.c') diff --git a/wintable/new/main.c b/wintable/new/main.c index 0c23767..b08a655 100644 --- a/wintable/new/main.c +++ b/wintable/new/main.c @@ -50,13 +50,6 @@ static void (*tablePanic)(const char *, DWORD) = NULL; #define panic(...) (*tablePanic)(__VA_ARGS__, GetLastError()) #define abort $$$$ // prevent accidental use of abort() -enum { - checkboxStateChecked = 1 << 0, - checkboxStateHot = 1 << 1, - checkboxStatePushed = 1 << 2, - checkboxnStates = 1 << 3, -}; - struct table { HWND hwnd; HWND header; @@ -75,7 +68,6 @@ struct table { intptr_t selectedRow; intptr_t selectedColumn; HTHEME theme; - HBITMAP checkboxImages[checkboxnStates]; int checkboxWidth; int checkboxHeight; }; @@ -130,7 +122,7 @@ static LRESULT CALLBACK tableWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM makeHeader(t, cs->hInstance); t->selectedRow = -1; t->selectedColumn = -1; - makeCheckboxImages(t); + loadCheckboxThemeData(t); initDummyTableStuff(t); SetWindowLongPtrW(hwnd, GWLP_USERDATA, (LONG_PTR) t); } @@ -141,7 +133,7 @@ initDummyTableStuff(t); printf("destroy\n"); // TODO free appropriate (after figuring this part out) components of t // TODO send EVENT_OBJECT_DESTROY events to accessibility listeners (when appropriate); see the note on proxy objects as well - freeCheckboxImages(t); + freeCheckboxThemeData(t); destroyHeader(t); tableFree(t, "error allocating internal Table data structure"); return DefWindowProcW(hwnd, uMsg, wParam, lParam); -- cgit v1.2.3