diff --git a/include/wx/msw/progdlg.h b/include/wx/msw/progdlg.h index 8102c9fdf1..459002410f 100644 --- a/include/wx/msw/progdlg.h +++ b/include/wx/msw/progdlg.h @@ -47,6 +47,8 @@ public: // Must provide overload to avoid hiding it (and warnings about it) virtual void Update() { wxGenericProgressDialog::Update(); } + virtual WXWidget GetHandle() const; + private: // Performs common routines to Update() and Pulse(). Requires the // shared object to have been entered. diff --git a/src/msw/progdlg.cpp b/src/msw/progdlg.cpp index a39706ed29..09cba141b7 100644 --- a/src/msw/progdlg.cpp +++ b/src/msw/progdlg.cpp @@ -518,6 +518,23 @@ void wxProgressDialog::Resume() #endif // wxHAS_MSW_TASKDIALOG } +WXWidget wxProgressDialog::GetHandle() const +{ +#ifdef wxHAS_MSW_TASKDIALOG + if ( HasNativeTaskDialog() ) + { + HWND hwnd; + { + wxCriticalSectionLocker locker(m_sharedData->m_cs); + m_sharedData->m_state = m_state; + hwnd = m_sharedData->m_hwnd; + } + return hwnd; + } +#endif + return wxGenericProgressDialog::GetHandle(); +} + int wxProgressDialog::GetValue() const { #ifdef wxHAS_MSW_TASKDIALOG