3 #include "StandAloneDlg.h"
\r
5 #define MSG_PROGRESSDLG_UPDATE_UI (WM_USER+121)
\r
6 // CProgressDlg dialog
\r
7 #define MSG_PROGRESSDLG_START 0
\r
8 #define MSG_PROGRESSDLG_RUN 50
\r
9 #define MSG_PROGRESSDLG_END 110
\r
11 class CProgressDlg : public CResizableStandAloneDialog
\r
13 DECLARE_DYNAMIC(CProgressDlg)
\r
16 CProgressDlg(CWnd* pParent = NULL); // standard constructor
\r
17 virtual ~CProgressDlg();
\r
18 virtual BOOL OnInitDialog();
\r
20 enum { IDD = IDD_GITPROGRESS };
\r
22 std::vector<CString> m_GitCmdList;
\r
26 CProgressCtrl m_Progress;
\r
30 CAnimateCtrl m_Animate;
\r
31 CStatic m_CurrentWork;
\r
32 CWinThread* m_pThread;
\r
33 volatile LONG m_bThreadRunning;
\r
35 BOOL m_bShowCommand; // whether to display the command in the log window (default true)
\r
36 CString m_PreText; // optional text to show in log window before running command
\r
39 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
\r
40 static UINT ProgressThreadEntry(LPVOID pVoid);
\r
41 UINT ProgressThread();
\r
43 void ParserCmdOutput(TCHAR ch);
\r
44 int FindPercentage(CString &log);
\r
45 void RemoveLastLine(CString &str);
\r
47 LRESULT CProgressDlg::OnProgressUpdateUI(WPARAM wParam,LPARAM lParam);
\r
50 DECLARE_MESSAGE_MAP()
\r
52 afx_msg void OnBnClickedOk();
\r