Use task dialog for wxProgressDialog implementation in wxMSW.
If available, the task dialog is now used for the wxProgressDialog under Windows. This provides a much more native looking dialog which doesn't look out of place under modern Windows versions, unlike the generic implementation. The internals of the code had to be significantly changed as the task dialog can only be shown modally so, to emulate wxProgressDialog modeless nature, a separate thread is used for the progress dialog management. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65352 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_PROGRESSDLG
|
||||
|
||||
/*
|
||||
* wxProgressDialog flags
|
||||
*/
|
||||
@@ -31,6 +33,28 @@
|
||||
#include "wx/palmos/progdlg.h"
|
||||
#else
|
||||
#include "wx/generic/progdlgg.h"
|
||||
#endif
|
||||
|
||||
#if defined(__WXMSW__) && wxUSE_THREADS
|
||||
#include "wx/msw/progdlg.h"
|
||||
#else
|
||||
class WXDLLIMPEXP_CORE wxProgressDialog
|
||||
: public wxGenericProgressDialog
|
||||
{
|
||||
public:
|
||||
wxProgressDialog( const wxString& title, const wxString& message,
|
||||
int maximum = 100,
|
||||
wxWindow *parent = NULL,
|
||||
int style = wxPD_APP_MODAL | wxPD_AUTO_HIDE )
|
||||
: wxGenericProgressDialog( title, message, maximum,
|
||||
parent, style )
|
||||
{ }
|
||||
|
||||
private:
|
||||
wxDECLARE_DYNAMIC_CLASS_NO_COPY( wxProgressDialog );
|
||||
};
|
||||
#endif // defined(__WXMSW__) && wxUSE_THREADS
|
||||
#endif // __WXPALMOS__
|
||||
|
||||
#endif // wxUSE_PROGRESSDLG
|
||||
|
||||
#endif // _WX_PROGDLG_H_BASE_
|
||||
|
Reference in New Issue
Block a user