12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- #pragma once
- #include "openmpt/all/BuildSettings.hpp"
- OPENMPT_NAMESPACE_BEGIN
- class CProgressDialog : public CDialog
- {
- private:
- ITaskbarList3 *m_taskBarList = nullptr;
- uint64 m_min = 0, m_max = 0, m_shift = 0;
- const bool m_customDialog;
- public:
- bool m_abort = false;
- CProgressDialog(CWnd *parent = nullptr, UINT resourceID = 0);
- ~CProgressDialog();
-
- void SetTitle(const TCHAR *title);
-
- void SetAbortText(const TCHAR *abort);
-
- void SetText(const TCHAR *text);
-
- void SetRange(uint64 min, uint64 max);
-
- void SetProgress(uint64 progress);
-
- void EnableTaskbarProgress();
-
- void ProcessMessages();
-
-
- virtual void Run() = 0;
- protected:
- BOOL OnInitDialog() override;
- void OnCancel() override { m_abort = true; }
- DECLARE_MESSAGE_MAP()
- };
- OPENMPT_NAMESPACE_END
|