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