X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/37d729ed98c7026793e1ba749b3dee107c077284..85d8df29aa7c2de9ea92d13adeff46d5ed854d58:/src/msw/popupwin.cpp diff --git a/src/msw/popupwin.cpp b/src/msw/popupwin.cpp index fbe5ad21fb..78a9a676bf 100644 --- a/src/msw/popupwin.cpp +++ b/src/msw/popupwin.cpp @@ -38,16 +38,17 @@ #include "wx/msw/private.h" // for GetDesktopWindow() -IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow, wxWindow) - // ============================================================================ // implementation // ============================================================================ bool wxPopupWindow::Create(wxWindow *parent, int flags) { + // popup windows are created hidden by default + Hide(); + return wxPopupWindowBase::Create(parent) && - wxWindow::Create(parent, -1, + wxWindow::Create(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, flags | wxPOPUP_WINDOW); } @@ -97,7 +98,7 @@ WXHWND wxPopupWindow::MSWGetParent() const bool wxPopupWindow::Show(bool show) { if ( !wxWindowMSW::Show(show) ) - return FALSE; + return false; if ( show ) { @@ -108,7 +109,7 @@ bool wxPopupWindow::Show(bool show) } } - return TRUE; + return true; } #endif // #if wxUSE_POPUPWIN