summaryrefslogtreecommitdiff
path: root/wintable/new/header.h
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-12-10 10:01:16 -0500
committerPietro Gagliardi <[email protected]>2014-12-10 10:01:16 -0500
commita8fed6c28d1c81fbaf5457ad7df905f7de92ec9f (patch)
treee6eb2d11e551af2a1bfd7e5466ac8de56523c9f2 /wintable/new/header.h
parentcb199cca7795565efd5b434e8507a59db589fce1 (diff)
Changed from recomputeHScroll() to updateTableWidth() as we will store the table width separately and just use one call to SetScrollInfo() for everything to avoid weirdness.
Diffstat (limited to 'wintable/new/header.h')
-rw-r--r--wintable/new/header.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/wintable/new/header.h b/wintable/new/header.h
index 0f23a9a..47c13b2 100644
--- a/wintable/new/header.h
+++ b/wintable/new/header.h
@@ -53,6 +53,11 @@ static void headerAddColumn(struct table *t, WCHAR *name)
panic("error adding column to Table header");
}
+static void updateTableWidth(struct table *t)
+{
+ recomputeHScroll(t);
+}
+
HANDLER(headerNotifyHandler)
{
NMHDR *nmhdr = (NMHDR *) lParam;
@@ -61,8 +66,7 @@ HANDLER(headerNotifyHandler)
return FALSE;
if (nmhdr->code != HDN_ITEMCHANGED)
return FALSE;
- // TODO should this be last?
- recomputeHScroll(t);
+ updateTableWidth(t);
// TODO make more intelligent
InvalidateRect(t->hwnd, NULL, TRUE);
// TODO UpdateWindow()?