From 7a26870c1ab37f7eb430ffab51035a7d3cb48274 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Thu, 19 Feb 2015 23:43:26 -0500 Subject: [PATCH] Removed the last bit of new Windows Table test initialization stuff now that tableSetSelection is in; moved into the test program instead. --- wintable/main.h | 7 ------- wintable/test.c | 4 ++++ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/wintable/main.h b/wintable/main.h index ccfb5c1..27f84c7 100644 --- a/wintable/main.h +++ b/wintable/main.h @@ -94,12 +94,6 @@ static const handlerfunc handlers[] = { NULL, }; -static void initDummyTableStuff(struct table *t) -{ - t->selectedRow = 2; - t->selectedColumn = 1; -} - static LRESULT CALLBACK tableWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { struct table *t; @@ -119,7 +113,6 @@ static LRESULT CALLBACK tableWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM t->selectedRow = -1; t->selectedColumn = -1; loadCheckboxThemeData(t); -initDummyTableStuff(t); SetWindowLongPtrW(hwnd, GWLP_USERDATA, (LONG_PTR) t); } // even if we did the above, fall through diff --git a/wintable/test.c b/wintable/test.c index d3f75ab..942860c 100644 --- a/wintable/test.c +++ b/wintable/test.c @@ -13,6 +13,7 @@ HBITMAP mkbitmap(void); BOOL mainwinCreate(HWND hwnd, LPCREATESTRUCT lpcs) { intptr_t c; + intptr_t row, col; tablehwnd = CreateWindowExW(0, tableWindowClass, L"Main Window", @@ -40,6 +41,9 @@ BOOL mainwinCreate(HWND hwnd, LPCREATESTRUCT lpcs) } c = 100; SendMessageW(tablehwnd, tableSetRowCount, 0, (LPARAM) (&c)); + row = 2; + col = 1; + SendMessageW(tablehwnd, tableSetSelection, (WPARAM) (&row), (LPARAM) (&col)); SetFocus(tablehwnd); return TRUE; }