[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Re: [user32][msgbox] Disable IDCANCEL for some MessageBoxs
From: "Dmitry Timoshkov" <dmitry () codeweavers ! com>
Date: 2006-12-30 5:15:39
Message-ID: 00de01c72bd1$9096f540$0100a8c0 () DMITRY
[Download RAW message or body]
"Anatoly Lyutin" <vostok@etersoft.ru> wrote:
> @@ -129,9 +132,11 @@ static HFONT MSGBOX_OnInit(HWND hwnd, LP
> ShowWindow(GetDlgItem(hwnd, IDCANCEL), SW_HIDE);
> ShowWindow(GetDlgItem(hwnd, IDYES), SW_HIDE);
> ShowWindow(GetDlgItem(hwnd, IDNO), SW_HIDE);
> + bUseCancel = FALSE;
> break;
> case MB_YESNO:
> ShowWindow(GetDlgItem(hwnd, IDCANCEL), SW_HIDE);
> + bUseCancel = FALSE;
It would be much simpler to use IsWindowVisible(GetDlgItem(hwnd, IDCANCEL))
where appropriate instead of introducing bUseCancel.
> /* fall through */
> case MB_YESNOCANCEL:
> ShowWindow(GetDlgItem(hwnd, IDOK), SW_HIDE);
> @@ -147,6 +152,11 @@ static HFONT MSGBOX_OnInit(HWND hwnd, LP
> ShowWindow(GetDlgItem(hwnd, IDNO), SW_HIDE);
> break;
> }
> + if(!bUseCancel)
> + {
> + SetWindowLongW(hwnd,GWL_STYLE,GetWindowLongW(hwnd,GWL_STYLE)&~(WS_SYSMENU));
> + }
> + SetPropA(hwnd, "WINE_MSGBOX_BUSECANCEL", (HANDLE)bUseCancel);
What is the purpose of removing WS_SYSMENU? In any case this change requires
a test case.
--
Dmitry.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic