diff --git a/src/generic/progdlgg.cpp b/src/generic/progdlgg.cpp index b38e80e3a5..95e23580b6 100644 --- a/src/generic/progdlgg.cpp +++ b/src/generic/progdlgg.cpp @@ -115,11 +115,7 @@ wxProgressDialog::wxProgressDialog(wxString const &title, m_maximum /= m_factor; #endif // __WXMSW__ - m_parentTop = parent; - while ( m_parentTop && m_parentTop->GetParent() ) - { - m_parentTop = m_parentTop->GetParent(); - } + m_parentTop = wxGetTopLevelParent(parent); wxLayoutConstraints *c;