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