summaryrefslogtreecommitdiff
path: root/wintable/new/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'wintable/new/main.c')
-rw-r--r--wintable/new/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/wintable/new/main.c b/wintable/new/main.c
index 00bc5fb..9a806b6 100644
--- a/wintable/new/main.c
+++ b/wintable/new/main.c
@@ -64,6 +64,8 @@ struct table {
intptr_t vpagesize; // in rows
int hwheelCarry;
int vwheelCarry;
+ intptr_t selectedRow;
+ intptr_t selectedColumn;
};
#include "util.h"
@@ -92,6 +94,8 @@ static const handlerfunc handlers[] = {
static void initDummyTableStuff(struct table *t)
{
t->count = 100;
+ t->selectedRow = 2;
+ t->selectedColumn = 1;
}
static LRESULT CALLBACK tableWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
@@ -110,6 +114,8 @@ static LRESULT CALLBACK tableWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM
t = (struct table *) tableAlloc(sizeof (struct table), "error allocating internal Table data structure");
t->hwnd = hwnd;
makeHeader(t, cs->hInstance);
+ t->selectedRow = -1;
+ t->selectedColumn = -1;
initDummyTableStuff(t);
SetWindowLongPtrW(hwnd, GWLP_USERDATA, (LONG_PTR) t);
}