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)