diff options
| author | Pietro Gagliardi <[email protected]> | 2014-12-13 11:49:36 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-12-13 11:49:36 -0500 |
| commit | 7b9b41d6cc2d5ea12079a065daf560fe79ca5bb7 (patch) | |
| tree | 7916ac239d6ba365b24ceb0d041a31c72befc374 /wintable/new/main.c | |
| parent | 980868ef0d560fc3bb1f996f0a1a2edd65185d9c (diff) | |
Started to lay down the groundwork for handling selection.
Diffstat (limited to 'wintable/new/main.c')
| -rw-r--r-- | wintable/new/main.c | 6 |
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); } |
