From 7cb83a8b785ee36d8c9fba5ccbb8998659b36fe0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 17 Dec 2011 23:04:50 +0000 Subject: [PATCH] Don't activate MSW dialogs when setting their initial size. As the dialog is not shown yet at this moment, activating it didn't work correctly and the dialog didn't get the focus when it was shown later. Fix this by preventing ::SetWindowPos() from activating it, which it does by default. Closes #13765. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/toplevel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 8378923a5c..8219f12a43 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -462,7 +462,7 @@ bool wxTopLevelWindowMSW::CreateDialog(const void *dlgTemplate, // Let the system position the window, just set its size. ::SetWindowPos(GetHwnd(), 0, 0, 0, w, h, - SWP_NOMOVE | SWP_NOZORDER); + SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE); } else // Move the window to the desired location and set its size too. { -- 2.45.2