X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2aee749cb188d42282f54043a9723778f1cf1a05..0d1903dbda864780eec30efdc4e91776bdbfd21b:/src/msw/nativewin.cpp?ds=inline diff --git a/src/msw/nativewin.cpp b/src/msw/nativewin.cpp index 3ac00548a7..13b8a77efa 100644 --- a/src/msw/nativewin.cpp +++ b/src/msw/nativewin.cpp @@ -3,7 +3,6 @@ // Purpose: wxNativeWindow implementation // Author: Vadim Zeitlin // Created: 2008-03-05 -// RCS-ID: $Id$ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -54,9 +53,30 @@ bool wxNativeContainerWindow::Create(wxNativeContainerWindowHandle hwnd) return true; } +bool wxNativeContainerWindow::IsShown() const +{ + return (IsWindowVisible(static_cast(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()