]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/panelg.cpp
More compilation fixes for new wxRTC image code without PCH.
[wxWidgets.git] / src / generic / panelg.cpp
index ee4a901a06c105d6d431934a31a54f54a9d5f70b..32e656f94e3c6f431b47c058c8e5e7f636511df6 100644 (file)
@@ -104,10 +104,6 @@ WX_DELEGATE_TO_CONTROL_CONTAINER(wxPanel, wxWindow)
 void wxPanel::Init()
 {
     WX_INIT_CONTROL_CONTAINER();
-
-#ifdef __WXMSW__
-    m_isTransparent = false;
-#endif // __WXMSW__
 }
 
 bool wxPanel::Create(wxWindow *parent, wxWindowID id,
@@ -141,3 +137,20 @@ void wxPanel::InitDialog()
     GetEventHandler()->ProcessEvent(event);
 }
 
+#ifdef __WXMSW__
+
+bool wxPanel::HasTransparentBackground()
+{
+    for ( wxWindow *win = GetParent(); win; win = win->GetParent() )
+    {
+        if ( win->MSWHasInheritableBackground() )
+            return true;
+
+        if ( win->IsTopLevel() )
+            break;
+    }
+
+    return false;
+}
+
+#endif // __WXMSW__