summaryrefslogtreecommitdiff
path: root/redo/table_windows.c
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-08-25 13:54:15 -0400
committerPietro Gagliardi <[email protected]>2014-08-25 13:54:15 -0400
commit3b703fc2416590f4b2172ed0e2371e8e1b81c77d (patch)
tree561b4b1449fe989c1f7b9068f7c9d7f2bce5b6f2 /redo/table_windows.c
parent6e9ef7e2a6a5e107bc8b7714b3f2b01f9e49ce15 (diff)
Stored the HIMAGELIST in the tableData struct. Now to store the HTHEME too...
Diffstat (limited to 'redo/table_windows.c')
-rw-r--r--redo/table_windows.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/redo/table_windows.c b/redo/table_windows.c
index 25cc81b..2f7d538 100644
--- a/redo/table_windows.c
+++ b/redo/table_windows.c
@@ -33,12 +33,13 @@ struct tableData {
static void tableSetCheckboxImageList(HWND hwnd, struct tableData *t)
{
- HIMAGELIST checkboxImageList;
+ HIMAGELIST old;
- checkboxImageList = makeCheckboxImageList(hwnd);
- if (SendMessageW(hwnd, LVM_SETIMAGELIST, LVSIL_STATE, (LPARAM) (checkboxImageList)) == (LRESULT) NULL)
+ old = t->checkboxImageList;
+ t->checkboxImageList = makeCheckboxImageList(hwnd);
+ if (SendMessageW(hwnd, LVM_SETIMAGELIST, LVSIL_STATE, (LPARAM) (t->checkboxImageList)) == (LRESULT) NULL)
;//TODO xpanic("error setting image list", GetLastError());
- // TODO free old one here if any/different
+ // TODO free old one here if any
// thanks to Jonathan Potter (http://stackoverflow.com/questions/25354448/why-do-my-owner-data-list-view-state-images-come-up-as-blank-on-windows-xp)
if (SendMessageW(hwnd, LVM_SETCALLBACKMASK, LVIS_STATEIMAGEMASK, 0) == FALSE)
xpanic("error marking state image list as application-managed", GetLastError());
@@ -88,6 +89,9 @@ static LRESULT CALLBACK tableSubProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM
case msgTableMakeInitialImageList:
tableSetCheckboxImageList(hwnd, t);
return 0;
+ case WM_THEMECHANGED:
+ tableSetCheckboxImageList(hwnd, t);
+ return (*fv_DefSubclassProc)(hwnd, uMsg, wParam, lParam);
// see table.autoresize() in table_windows.go for the column autosize policy
case WM_NOTIFY: // from the contained header control
if (nmhdr->code == HDN_BEGINTRACK)