BrowseRefs: Context menu enhancements
[TortoiseGit.git] / src / TortoiseProc / ProgressDlg.h
blob4b89b7eabf5ec5af848127340abba9db82a983ff
1 #pragma once
3 #include "StandAloneDlg.h"
5 #define MSG_PROGRESSDLG_UPDATE_UI (WM_USER+121)
6 // CProgressDlg dialog
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)
15 public:
16 CProgressDlg(CWnd* pParent = NULL); // standard constructor
17 virtual ~CProgressDlg();
18 virtual BOOL OnInitDialog();
19 // Dialog Data
20 enum { IDD = IDD_GITPROGRESS };
21 CString m_GitCmd;
22 std::vector<CString> m_GitCmdList;
24 CString m_LogFile;
26 CProgressCtrl m_Progress;
28 CEdit m_Log;
29 CString m_Title;
30 CAnimateCtrl m_Animate;
31 CStatic m_CurrentWork;
32 CWinThread* m_pThread;
33 volatile LONG m_bThreadRunning;
34 DWORD m_GitStatus;
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
37 CString m_LogText;
38 protected:
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);
50 DECLARE_MESSAGE_MAP()
51 public:
52 afx_msg void OnBnClickedOk();