Index: dlls/user32/msgbox.c =================================================================== RCS file: /home/wine/wine/dlls/user32/msgbox.c,v retrieving revision 1.1 diff -u -p -u -r1.1 msgbox.c --- dlls/user32/msgbox.c 16 Nov 2006 14:02:17 -0000 1.1 +++ dlls/user32/msgbox.c 23 Dec 2006 12:43:23 -0000 @@ -76,6 +76,7 @@ static HFONT MSGBOX_OnInit(HWND hwnd, LP NONCLIENTMETRICSW nclm; LPCWSTR lpszText; WCHAR buf[256]; + BOOL bUseCancel; nclm.cbSize = sizeof(nclm); SystemParametersInfoW (SPI_GETNONCLIENTMETRICS, 0, &nclm, 0); @@ -112,6 +113,7 @@ static HFONT MSGBOX_OnInit(HWND hwnd, LP TRACE_(msgbox)("%s\n", debugstr_w(lpszText)); SetWindowTextW(GetDlgItem(hwnd, MSGBOX_IDTEXT), lpszText); + bUseCancel = TRUE; /* Hide not selected buttons */ switch(lpmb->dwStyle & MB_TYPEMASK) { case MB_OK: @@ -129,10 +131,12 @@ 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); - /* fall through */ + bUseCancel = FALSE; + /* fall through */ case MB_YESNOCANCEL: ShowWindow(GetDlgItem(hwnd, IDOK), SW_HIDE); ShowWindow(GetDlgItem(hwnd, IDABORT), SW_HIDE); @@ -147,6 +151,10 @@ 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)); + } /* Set the icon */ switch(lpmb->dwStyle & MB_ICONMASK) { case MB_ICONEXCLAMATION: