X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6c9a19aabab3a878b565e6c2a5f2a3824277c4dc..c15d9c859c64f28c56d1e61b7d031a74e6018583:/src/msw/popupwin.cpp diff --git a/src/msw/popupwin.cpp b/src/msw/popupwin.cpp index a9c0676ae3..eb811168db 100644 --- a/src/msw/popupwin.cpp +++ b/src/msw/popupwin.cpp @@ -31,6 +31,8 @@ #ifndef WX_PRECOMP #endif //WX_PRECOMP +#if wxUSE_POPUPWIN + #include "wx/popupwin.h" #include "wx/msw/private.h" // for GetDesktopWindow() @@ -85,3 +87,22 @@ WXHWND wxPopupWindow::MSWGetParent() const return (WXHWND)::GetDesktopWindow(); } +bool wxPopupWindow::Show(bool show) +{ + if ( !wxWindowMSW::Show(show) ) + return FALSE; + + if ( show ) + { + // raise to top of z order + if (!::SetWindowPos(GetHwnd(), HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE)) + { + wxLogLastError(_T("SetWindowPos")); + } + } + + return TRUE; +} + +#endif // #if wxUSE_POPUPWIN +