From 9c93c484c5b967b55de71545d73397e536bce81c Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Mon, 14 Jun 2004 19:34:58 +0000 Subject: [PATCH] - Use hourglass cursor for better feedback when expanding nodes. - Turn off redrawing when expanding to make it faster. --- programs/regedit/treeview.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/programs/regedit/treeview.c b/programs/regedit/treeview.c index 9d61d545250..f9b49734994 100644 --- a/programs/regedit/treeview.c +++ b/programs/regedit/treeview.c @@ -249,6 +249,7 @@ BOOL OnTreeExpanding(HWND hwndTV, NMTREEVIEW* pnmtv) LPCTSTR keyPath; LPTSTR Name; LONG errCode; + HCURSOR hcursorOld; static int expanding; if (expanding) return FALSE; @@ -256,6 +257,8 @@ BOOL OnTreeExpanding(HWND hwndTV, NMTREEVIEW* pnmtv) return TRUE; } expanding = TRUE; + hcursorOld = SetCursor(LoadCursor(NULL, IDC_WAIT)); + SendMessage(hwndTV, WM_SETREDRAW, FALSE, 0); keyPath = GetItemPath(hwndTV, pnmtv->itemNew.hItem, &hRoot); if (!keyPath) goto done; @@ -291,6 +294,8 @@ BOOL OnTreeExpanding(HWND hwndTV, NMTREEVIEW* pnmtv) HeapFree(GetProcessHeap(), 0, Name); done: + SendMessage(hwndTV, WM_SETREDRAW, TRUE, 0); + SetCursor(hcursorOld); expanding = FALSE; return TRUE;