From d2a8f01ae644145f6533b78edb5a386467ada9c4 Mon Sep 17 00:00:00 2001 From: Andreas Mohr <andi@rhlx01.fht-esslingen.de> Date: Fri, 22 Feb 2002 21:20:04 +0000 Subject: [PATCH] Remember the currently active index before refreshing. --- programs/uninstaller/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/programs/uninstaller/main.c b/programs/uninstaller/main.c index 1d01875231b..c3ff2a0347b 100644 --- a/programs/uninstaller/main.c +++ b/programs/uninstaller/main.c @@ -346,10 +346,12 @@ LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) case WM_PAINT: { + int prevsel = SendMessage(hwndList, LB_GETCURSEL, 0, 0); SendMessage(hwndList, LB_RESETCONTENT, 0, 0); SendMessage(hwndList, WM_SETREDRAW, FALSE, 0); for (i=0; i < numentries; i++) SendMessage(hwndList, LB_ADDSTRING, 0, (LPARAM)entries[i].descr); + SendMessage(hwndList, LB_SETCURSEL, prevsel, 0 ); SendMessage(hwndList, WM_SETREDRAW, TRUE, 0); hdc = BeginPaint( hWnd, &ps ); EndPaint( hWnd, &ps ); -- GitLab