From cab2d934495949cadf5345f910339054f426ccea Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Thu, 19 Feb 2015 22:58:17 -0500 Subject: Added tableGetSelection to the new Windows Table and hooked it up to package ui's Table. --- table_windows.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'table_windows.c') diff --git a/table_windows.c b/table_windows.c index 8d92a8e..8b352d7 100644 --- a/table_windows.c +++ b/table_windows.c @@ -74,10 +74,12 @@ void tableAutosizeColumns(HWND hwnd, int nColumns) xpanic("error resizing columns of results list view", GetLastError()); } -// because Go won't let me do C.WPARAM(-1) intptr_t tableSelectedItem(HWND hwnd) { - return (intptr_t) SendMessageW(hwnd, LVM_GETNEXTITEM, (WPARAM) -1, LVNI_SELECTED); + intptr_t row; + + SendMessageW(hwnd, tableGetSelection, (WPARAM) (&row), (LPARAM) NULL); + return row; } /* -- cgit v1.2.3