]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/popupwin.cpp
Missing define.
[wxWidgets.git] / src / msw / popupwin.cpp
index b47741145cf4d9e3723b52bee1b20f7fd805afd5..dcd2272474e8ed0f312bc21f9a8d8bfa9c42e5d0 100644 (file)
@@ -17,7 +17,7 @@
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
     #pragma implementation "popup.h"
 #endif
 
@@ -29,6 +29,7 @@
 #endif
 
 #ifndef WX_PRECOMP
+#include "wx/defs.h"
 #endif //WX_PRECOMP
 
 #if wxUSE_POPUPWIN
@@ -45,8 +46,11 @@ 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,
+               wxWindow::Create(parent, wxID_ANY,
                                 wxDefaultPosition, wxDefaultSize,
                                 flags | wxPOPUP_WINDOW);
 }
@@ -96,7 +100,7 @@ WXHWND wxPopupWindow::MSWGetParent() const
 bool wxPopupWindow::Show(bool show)
 {
     if ( !wxWindowMSW::Show(show) )
-        return FALSE;
+        return false;
 
     if ( show )
     {
@@ -107,7 +111,7 @@ bool wxPopupWindow::Show(bool show)
         }
     }
 
-    return TRUE;
+    return true;
 }
 
 #endif // #if wxUSE_POPUPWIN