From 22cf5fec15463fae0fea4db2c95119018c60d3be Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 24 Jul 1999 23:16:35 +0000 Subject: [PATCH] wxDialog::IsModal() works git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msw/dialog.h | 3 +-- src/msw/dialog.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/wx/msw/dialog.h b/include/wx/msw/dialog.h index 917667ed4f..0e4dce9d62 100644 --- a/include/wx/msw/dialog.h +++ b/include/wx/msw/dialog.h @@ -89,8 +89,7 @@ public: void SetModal(bool flag); virtual void Centre(int direction = wxBOTH); - virtual bool IsModal() const - { return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); } + virtual bool IsModal() const; // For now, same as Show(TRUE) but returns return code virtual int ShowModal(); diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp index 44cd609ee9..0deadd900a 100644 --- a/src/msw/dialog.cpp +++ b/src/msw/dialog.cpp @@ -278,7 +278,12 @@ void wxDialog::GetPosition(int *x, int *y) const bool wxDialog::IsShown() const { - return m_isShown; + return wxModalDialogs.Find(this); +} + +bool wxDialog::IsModal() const +{ + return wxModalDialogs. } bool wxDialog::Show(bool show) -- 2.45.2