Commit 0c24f2b8 authored by Santino Mazza's avatar Santino Mazza Committed by Alexandre Julliard

user32/msgbox: Implement MB_SYSTEMMODAL.

parent 18b5cc5e
......@@ -109,6 +109,12 @@ static void MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSW lpmb)
lpszText = lpmb->lpszText;
}
/* handle modal message boxes */
if (((lpmb->dwStyle & MB_TASKMODAL) && (lpmb->hwndOwner==NULL)))
NtUserSetWindowPos( hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE );
else if (lpmb->dwStyle & MB_SYSTEMMODAL)
NtUserSetWindowPos( hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED );
TRACE_(msgbox)("%s\n", debugstr_w(lpszText));
SetWindowTextW(GetDlgItem(hwnd, MSGBOX_IDTEXT), lpszText);
......@@ -309,10 +315,6 @@ static void MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSW lpmb)
}
}
/*handle modal message boxes*/
if (((lpmb->dwStyle & MB_TASKMODAL) && (lpmb->hwndOwner==NULL)) || (lpmb->dwStyle & MB_SYSTEMMODAL))
NtUserSetWindowPos( hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE );
HeapFree( GetProcessHeap(), 0, buffer );
}
......
......@@ -2160,7 +2160,7 @@ static LRESULT CALLBACK msgbox_sysmodal_hook_proc(INT code, WPARAM wParam, LPARA
if (msgbox)
{
todo_wine ok(exstyles & WS_EX_TOPMOST, "expected message box to have topmost exstyle set\n");
ok(exstyles & WS_EX_TOPMOST, "expected message box to have topmost exstyle set\n");
SendDlgItemMessageA(msgbox, IDCANCEL, WM_LBUTTONDOWN, 0, 0);
SendDlgItemMessageA(msgbox, IDCANCEL, WM_LBUTTONUP, 0, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment