From: Vadim Zeitlin Date: Sat, 5 Dec 2009 17:31:07 +0000 (+0000) Subject: Implement wxNativeContainerWindow::IsShown() for MSW. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/da00cef2d8497aff5bd5d84bed7983575fce71f0 Implement wxNativeContainerWindow::IsShown() for MSW. Simply use native ::IsWindowVisible() for IsShown() implementation. Closes #11503. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62783 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/nativewin.h b/include/wx/nativewin.h index f38d8e978f..60d94037cf 100644 --- a/include/wx/nativewin.h +++ b/include/wx/nativewin.h @@ -145,6 +145,9 @@ public: return false; } +#ifdef __WXMSW__ + virtual bool IsShown() const; +#endif // __WXMSW__ // this is an implementation detail: called when the native window is // destroyed by an outside agency; deletes the C++ object too but can in diff --git a/src/msw/nativewin.cpp b/src/msw/nativewin.cpp index 6b3649b842..068185f8a0 100644 --- a/src/msw/nativewin.cpp +++ b/src/msw/nativewin.cpp @@ -54,6 +54,11 @@ bool wxNativeContainerWindow::Create(wxNativeContainerWindowHandle hwnd) return true; } +bool wxNativeContainerWindow::IsShown() const +{ + return (IsWindowVisible(static_cast(m_hWnd)) != 0); +} + void wxNativeContainerWindow::OnNativeDestroyed() { // don't use Close() or even Destroy() here, we really don't want to keep