X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14f355c2b5c71fc7c3d680aea366582d2ac60f7b..e24b680c59e78f092c1be432b17b36f849065c36:/src/msw/popupwin.cpp diff --git a/src/msw/popupwin.cpp b/src/msw/popupwin.cpp index f19637098b..78a9a676bf 100644 --- a/src/msw/popupwin.cpp +++ b/src/msw/popupwin.cpp @@ -29,6 +29,7 @@ #endif #ifndef WX_PRECOMP +#include "wx/defs.h" #endif //WX_PRECOMP #if wxUSE_POPUPWIN @@ -37,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); } @@ -96,7 +98,7 @@ WXHWND wxPopupWindow::MSWGetParent() const bool wxPopupWindow::Show(bool show) { if ( !wxWindowMSW::Show(show) ) - return FALSE; + return false; if ( show ) { @@ -107,7 +109,7 @@ bool wxPopupWindow::Show(bool show) } } - return TRUE; + return true; } #endif // #if wxUSE_POPUPWIN