From ea5e7e37e89cd1d4a783727c0f049d16691e2af6 Mon Sep 17 00:00:00 2001 From: huangjianxiong1 Date: Wed, 20 Sep 2023 17:41:26 +0800 Subject: [PATCH] call SetForegroundWindow for msgbox --- SOUI/src/control/SMessageBox.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/SOUI/src/control/SMessageBox.cpp b/SOUI/src/control/SMessageBox.cpp index b49ee0c28..94d5c4537 100755 --- a/SOUI/src/control/SMessageBox.cpp +++ b/SOUI/src/control/SMessageBox.cpp @@ -188,6 +188,7 @@ BOOL SMessageBoxImpl::OnInitDialog(HWND wnd, LPARAM lInitParam) SetWindowPos(0, 0, 0, szWnd.cx, szWnd.cy, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER); CenterWindow(); + SetForegroundWindow(m_hWnd); SetMsgHandled(FALSE); // chain to dpihandler. return 0; }