From: Toni Wilen Date: Wed, 30 Oct 2019 18:22:14 +0000 (+0200) Subject: GUI corruption fix. X-Git-Tag: 4300~56 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=57ac184e1953397e5070b6c4f5a4fb7820e7f1d5;p=francis%2Fwinuae.git GUI corruption fix. --- diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index ca07f06f..d43d3093 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -20596,8 +20596,6 @@ static HWND updatePanel (int id, UINT action) if (!hDlg) return NULL; - SetWindowRedraw(hDlg, FALSE); - if (first) { first = false; getguisize (hDlg, &gui_width, &gui_height); @@ -20615,9 +20613,11 @@ static HWND updatePanel (int id, UINT action) ew (guiDlg, IDC_RESETAMIGA, full_property_sheet ? FALSE : TRUE); ew (guiDlg, IDOK, TRUE); if (panelDlg != NULL) { + SetWindowRedraw(hDlg, FALSE); ShowWindow (panelDlg, FALSE); DestroyWindow (panelDlg); panelDlg = NULL; + SetWindowRedraw(hDlg, TRUE); } if (ToolTipHWND != NULL) { DestroyWindow (ToolTipHWND); @@ -20658,8 +20658,6 @@ static HWND updatePanel (int id, UINT action) panelresource->child = res; panelDlg = x_CreateDialogIndirectParam(res->inst, res->resource, hDlg, ppage[id].dlgproc, id, res); - //SetWindowRedraw(hDlg, FALSE); - rescaleresource(panelresource, false); freescaleresource(res); @@ -20688,18 +20686,12 @@ static HWND updatePanel (int id, UINT action) EnumChildWindows (panelDlg, &childenumproc, (LPARAM)ppage[currentpage].nres->tmpl); SendMessage (panelDlg, WM_NULL, 0, 0); - //SetWindowRedraw(hDlg, TRUE); - //RedrawWindow(hDlg, NULL, NULL, RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_UPDATENOW); - hAccelTable = ppage[currentpage].accel; if (ppage[id].focusid > 0 && action != TVC_BYKEYBOARD) { setfocus (panelDlg, ppage[id].focusid); } - SetWindowRedraw(hDlg, TRUE); - RedrawWindow(panelDlg, NULL, NULL, RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN); - return panelDlg; } @@ -21535,6 +21527,7 @@ INT_PTR CustomDialogBox (int templ, HWND hDlg, DLGPROC proc) if (!res) return h; if (scaleresource (res, &dctx, hDlg, -1, 0, 0, -1)) { + res->parent = panelresource; h = DialogBoxIndirect (res->inst, res->resource, hDlg, proc); } customDlgType = 0; @@ -21553,6 +21546,7 @@ HWND CustomCreateDialog (int templ, HWND hDlg, DLGPROC proc) if (!res) return h; if (scaleresource (res, &dctx, hDlg, -1, 0, 0, -1)) { + res->parent = panelresource; h = x_CreateDialogIndirectParam(res->inst, res->resource, hDlg, proc, NULL, res); } freescaleresource (res); @@ -21893,6 +21887,7 @@ static int GetSettings (int all_options, HWND hwnd) } setguititle (dhwnd); + RedrawWindow(dhwnd, NULL, NULL, RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN); ShowWindow (dhwnd, SW_SHOW); MapDialogRect (dhwnd, &dialog_rect);