forked from bruderstein/nppPluginManager
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgressDialog.h
More file actions
43 lines (31 loc) · 1.02 KB
/
ProgressDialog.h
File metadata and controls
43 lines (31 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef _PROGRESSDIALOG_H
#define _PROGRESSDIALOG_H
#include "libinstall/CancelToken.h"
class ProgressDialog
{
public:
ProgressDialog(HINSTANCE hInst, CancelToken cancelToken, std::function<void(ProgressDialog*)> startFunction);
~ProgressDialog() {};
void doModal(HWND parent);
void stepComplete();
void setStepProgress(int percentageComplete);
void setCurrentStatus(const TCHAR* status);
void setStepCount(int stepCount);
void close();
/* Dialog procedures */
static INT_PTR CALLBACK dlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK runDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
private:
int _numberOfSteps;
int _completedSteps;
/* Handles */
HWND _hProgressOverall;
HWND _hProgressCurrent;
HWND _hStatus;
HWND _hSelf;
HINSTANCE _hInst;
CancelToken _cancelToken;
std::function<void(ProgressDialog*)> _startFunction;
void goToCenter();
};
#endif