From eefe6d4b7c63228b56b0688d289c39caab1f74d5 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 24 Mar 2004 14:21:17 +0000 Subject: [PATCH] don't show the window initially if m_isShown is false, i.e. if Hide() had been called before Create() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/wincmn.cpp | 4 ++-- src/msw/popupwin.cpp | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 1f80f28ee9..aa90c82cbd 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -121,8 +121,8 @@ wxWindowBase::wxWindowBase() m_maxWidth = m_maxHeight = -1; - // window is created enabled but it's not visible yet - m_isShown = false; + // window are created enabled and visible by default + m_isShown = m_isEnabled = true; // the default event handler is just this window diff --git a/src/msw/popupwin.cpp b/src/msw/popupwin.cpp index fbe5ad21fb..aa340cdc9f 100644 --- a/src/msw/popupwin.cpp +++ b/src/msw/popupwin.cpp @@ -46,6 +46,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow, wxWindow) bool wxPopupWindow::Create(wxWindow *parent, int flags) { + // popup windows are created hidden by default + Hide(); + return wxPopupWindowBase::Create(parent) && wxWindow::Create(parent, -1, wxDefaultPosition, wxDefaultSize, -- 2.50.0