]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/nativewin.cpp
Added ability to switch off more components of the size page UI
[wxWidgets.git] / src / msw / nativewin.cpp
index 3ac00548a74a94e45482e72465296151379cf8cb..068185f8a020831d76a8e9e547d04bdf0d21ab46 100644 (file)
@@ -54,9 +54,30 @@ bool wxNativeContainerWindow::Create(wxNativeContainerWindowHandle hwnd)
     return true;
 }
 
+bool wxNativeContainerWindow::IsShown() const
+{
+    return (IsWindowVisible(static_cast<HWND>(m_hWnd)) != 0);
+}
+
 void wxNativeContainerWindow::OnNativeDestroyed()
 {
-    // currently this is not called so nothing to do here
+    // don't use Close() or even Destroy() here, we really don't want to keep
+    // an object using a no more existing HWND around for longer than necessary
+    delete this;
+}
+
+WXLRESULT wxNativeContainerWindow::MSWWindowProc(WXUINT nMsg,
+                                                 WXWPARAM wParam,
+                                                 WXLPARAM lParam)
+{
+    if ( nMsg == WM_DESTROY )
+    {
+        OnNativeDestroyed();
+
+        return 0;
+    }
+
+    return wxTopLevelWindow::MSWWindowProc(nMsg, wParam, lParam);
 }
 
 wxNativeContainerWindow::~wxNativeContainerWindow()