[PATCH v2 0/3] MR9005: ShowWindow paramater usage
This patchset is just to correct the parameter passed to ShowWindow. -- v2: wordpad: Correct show parameter passed to ShowWindow cryptui: Correct show parameter passed to ShowWindow comdlg32: Correct show parameter passed to ShowWindow https://gitlab.winehq.org/wine/wine/-/merge_requests/9005
From: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- dlls/comdlg32/itemdlg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/comdlg32/itemdlg.c b/dlls/comdlg32/itemdlg.c index 3f51c37b62f..d42e692bec1 100644 --- a/dlls/comdlg32/itemdlg.c +++ b/dlls/comdlg32/itemdlg.c @@ -1454,7 +1454,7 @@ static void ctrl_container_reparent(FileDialogImpl *This, HWND parent) SetWindowLongW(This->cctrls_hwnd, GWL_STYLE, wndstyle); SetParent(This->cctrls_hwnd, parent); - ShowWindow(This->cctrls_hwnd, TRUE); + ShowWindow(This->cctrls_hwnd, SW_SHOW); /* Set the fonts to match the dialog font. */ font = (HFONT)SendMessageW(parent, WM_GETFONT, 0, 0); @@ -1469,7 +1469,7 @@ static void ctrl_container_reparent(FileDialogImpl *This, HWND parent) } else { - ShowWindow(This->cctrls_hwnd, FALSE); + ShowWindow(This->cctrls_hwnd, SW_HIDE); wndstyle = GetWindowLongW(This->cctrls_hwnd, GWL_STYLE); wndstyle &= ~(WS_CHILD); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9005
From: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- dlls/cryptui/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/cryptui/main.c b/dlls/cryptui/main.c index fcc570048ad..37300ae29fc 100644 --- a/dlls/cryptui/main.c +++ b/dlls/cryptui/main.c @@ -1504,7 +1504,7 @@ static INT_PTR CALLBACK select_store_dlg_proc(HWND hwnd, UINT msg, WPARAM wp, SendMessageW(GetDlgItem(hwnd, IDC_STORE_TEXT), WM_SETTEXT, 0, (LPARAM)selectInfo->info->pwszText); if (!(selectInfo->info->dwFlags & CRYPTUI_ENABLE_SHOW_PHYSICAL_STORE)) - ShowWindow(GetDlgItem(hwnd, IDC_SHOW_PHYSICAL_STORES), FALSE); + ShowWindow(GetDlgItem(hwnd, IDC_SHOW_PHYSICAL_STORES), SW_HIDE); enumerate_stores(hwnd, selectInfo->info->pEnumData); break; } @@ -2468,7 +2468,7 @@ static INT_PTR CALLBACK general_dlg_proc(HWND hwnd, UINT msg, WPARAM wp, page = (PROPSHEETPAGEW *)lp; pCertViewInfo = (PCCRYPTUI_VIEWCERTIFICATE_STRUCTW)page->lParam; if (pCertViewInfo->dwFlags & CRYPTUI_DISABLE_ADDTOSTORE) - ShowWindow(GetDlgItem(hwnd, IDC_ADDTOSTORE), FALSE); + ShowWindow(GetDlgItem(hwnd, IDC_ADDTOSTORE), SW_HIDE); EnableWindow(GetDlgItem(hwnd, IDC_ISSUERSTATEMENT), FALSE); set_general_info(hwnd, pCertViewInfo); break; @@ -4219,7 +4219,7 @@ static int CALLBACK cert_prop_sheet_proc(HWND hwnd, UINT msg, LPARAM lp) GetWindowRect(GetDlgItem(hwnd, IDCANCEL), &rc); MapWindowPoints( 0, hwnd, (POINT *)&rc, 2 ); /* hide the cancel button.. */ - ShowWindow(GetDlgItem(hwnd, IDCANCEL), FALSE); + ShowWindow(GetDlgItem(hwnd, IDCANCEL), SW_HIDE); /* and move the OK button to the cancel button's original position. */ SetWindowPos(GetDlgItem(hwnd, IDOK), 0, rc.left, rc.top, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9005
From: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- programs/wordpad/wordpad.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/wordpad/wordpad.c b/programs/wordpad/wordpad.c index 8617c2477c1..428db1862e4 100644 --- a/programs/wordpad/wordpad.c +++ b/programs/wordpad/wordpad.c @@ -765,7 +765,7 @@ static void preview_exit(HWND hMainWnd) HWND hEditorWnd = GetDlgItem(hMainWnd, IDC_EDITOR); set_bar_states(); - ShowWindow(hEditorWnd, TRUE); + ShowWindow(hEditorWnd, SW_SHOW); close_preview(hMainWnd); @@ -2249,7 +2249,7 @@ static LRESULT OnCommand( HWND hWnd, WPARAM wParam, LPARAM lParam) barState[index] = 1 << BANDID_STATUSBAR; set_bar_states(); barState[index] = tmp; - ShowWindow(hEditorWnd, FALSE); + ShowWindow(hEditorWnd, SW_HIDE); init_preview(hWnd, wszFileName); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9005
This merge request was approved by Esme Povirk. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9005
Again, this is modifying argument value. It doesn't look like that was intentional. If you are going for noop change ShowWindow(TRUE) should become ShowWindow(SW_SHOWNORMAL). -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9005#note_116464
participants (4)
-
Alistair Leslie-Hughes -
Alistair Leslie-Hughes (@alesliehughes) -
Esme Povirk (@madewokherd) -
Nikolay Sivov (@nsivov)