Commit b34c2163 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

user32/msgbox: Implement MB_TOPMOST.

parent adf77c1a
......@@ -110,10 +110,12 @@ static void MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSW lpmb)
}
/* handle modal message boxes */
if (((lpmb->dwStyle & MB_TASKMODAL) && (lpmb->hwndOwner==NULL)))
NtUserSetWindowPos( hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE );
if (lpmb->dwStyle & MB_TASKMODAL && lpmb->hwndOwner == NULL)
NtUserSetWindowPos( hwnd, lpmb->dwStyle & MB_TOPMOST ? HWND_TOPMOST : 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 );
else if (lpmb->dwStyle & MB_TOPMOST)
NtUserSetWindowPos( hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE );
TRACE_(msgbox)("%s\n", debugstr_w(lpszText));
SetWindowTextW(GetDlgItem(hwnd, MSGBOX_IDTEXT), lpszText);
......
......@@ -2149,8 +2149,7 @@ static LRESULT CALLBACK msgbox_hook_proc(INT code, WPARAM wParam, LPARAM lParam)
if (!system_modal)
expected_exstyles |= WS_EX_DLGMODALFRAME;
todo_wine_if((system_modal && exstyles == (expected_exstyles | WS_EX_DLGMODALFRAME))
|| (!system_modal && msgbox_type & MB_TOPMOST))
todo_wine_if(system_modal && exstyles == (expected_exstyles | WS_EX_DLGMODALFRAME))
ok(exstyles == expected_exstyles, "got %#lx, expected %#lx\n", exstyles, expected_exstyles);
text[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