summaryrefslogtreecommitdiff
path: root/wintable/new/header.h
diff options
context:
space:
mode:
Diffstat (limited to 'wintable/new/header.h')
-rw-r--r--wintable/new/header.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/wintable/new/header.h b/wintable/new/header.h
new file mode 100644
index 0000000..e06188a
--- /dev/null
+++ b/wintable/new/header.h
@@ -0,0 +1,20 @@
+// 7 december 2014
+
+static void makeHeader(struct table *t, HINSTANCE hInstance)
+{
+ t->header = CreateWindowExW(0,
+ WC_HEADERW, L"",
+ // TODO WS_BORDER?
+ // TODO is HDS_HOTTRACK needed?
+ WS_CHILD | HDS_FULLDRAG | HDS_HORZ | HDS_HOTTRACK,
+ 0, 0, 0, 0, // no initial size
+ t->hwnd, (HMENU) 100, hInstance, NULL);
+ if (t->header == NULL)
+ panic("error creating Table header");
+}
+
+static void destroyHeader(struct table *t)
+{
+ if (DestroyWindow(t->header) == 0)
+ panic("error destroying Table header");
+}