diff --git a/include/wx/msw/progdlg.h b/include/wx/msw/progdlg.h index 08495c8e46..6db08be01d 100644 --- a/include/wx/msw/progdlg.h +++ b/include/wx/msw/progdlg.h @@ -44,6 +44,7 @@ public: virtual void SetIcons(const wxIconBundle& icons) wxOVERRIDE; virtual void DoMoveWindow(int x, int y, int width, int height) wxOVERRIDE; virtual void DoGetPosition(int *x, int *y) const wxOVERRIDE; + virtual void DoGetSize(int *width, int *height) const wxOVERRIDE; virtual void Fit() wxOVERRIDE; virtual bool Show( bool show = true ) wxOVERRIDE; diff --git a/src/msw/progdlg.cpp b/src/msw/progdlg.cpp index feba07ea9b..2cf0fac97b 100644 --- a/src/msw/progdlg.cpp +++ b/src/msw/progdlg.cpp @@ -838,6 +838,24 @@ void wxProgressDialog::DoGetPosition(int *x, int *y) const wxGenericProgressDialog::DoGetPosition(x, y); } +void wxProgressDialog::DoGetSize(int *width, int *height) const +{ +#ifdef wxHAS_MSW_TASKDIALOG + if ( HasNativeTaskDialog() ) + { + const wxRect r = GetTaskDialogRect(); + if ( width ) + *width = r.width; + if ( height ) + *height = r.height; + + return; + } +#endif // wxHAS_MSW_TASKDIALOG + + wxGenericProgressDialog::DoGetSize(width, height); +} + void wxProgressDialog::Fit() { #ifdef wxHAS_MSW_TASKDIALOG