From a8fed6c28d1c81fbaf5457ad7df905f7de92ec9f Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Wed, 10 Dec 2014 10:01:16 -0500 Subject: 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. --- wintable/new/header.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'wintable/new/header.h') 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()? -- cgit v1.2.3