]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Use WM_SETREDRAW to disable incremental updates while the config box
authorSimon Tatham <anakin@pobox.com>
Fri, 7 Sep 2001 21:07:15 +0000 (21:07 +0000)
committerSimon Tatham <anakin@pobox.com>
Fri, 7 Sep 2001 21:07:15 +0000 (21:07 +0000)
is switching panels. Speeds things up hugely on slow systems.

[originally from svn r1236]

windlg.c

index a8f7ef0efbf1ef85a4c3d40b95856efe952b4bc3..f15e385da5d8c5f36e5ad6e4743940fb6008f88f 100644 (file)
--- a/windlg.c
+++ b/windlg.c
@@ -1484,6 +1484,9 @@ static int GenericMainDlgProc(HWND hwnd, UINT msg,
            TVITEM item;
            int j;
            char buffer[64];
+           SendMessage (hwnd, WM_SETREDRAW, FALSE, 0);
            item.hItem = i;
            item.pszText = buffer;
            item.cchTextMax = sizeof(buffer);
@@ -1528,6 +1531,9 @@ static int GenericMainDlgProc(HWND hwnd, UINT msg,
                create_controls(hwnd, dlgtype, translationpanelstart);
 
            init_dlg_ctrls(hwnd, FALSE);
+           SendMessage (hwnd, WM_SETREDRAW, TRUE, 0);
+           InvalidateRect (hwnd, NULL, TRUE);
 
            SetFocus(((LPNMHDR) lParam)->hwndFrom);     /* ensure focus stays */
            return 0;