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
44
45
46
47
48
|
#include <skygi/skygi.h>
#include "widgetprogressbar.h"
CProgressbar::CProgressbar() {
this->value = 0;
this->maximum = 100;
this->color = cGray;
}
HRESULT CProgressbar::Create(HANDLE parent, char * name, int x, int y, int w, int h, int style) {
this->hWnd = GI_WidgetProgressCreate(parent, name, x, y, w, h, style);
if (this->hWnd) {
return S_OK;
}
return E_HANDLE;
}
int CProgressbar::Redraw() {
return GI_WidgetProgressForceRedraw(this->hWnd);
}
int CProgressbar::SetValue(int val) {
this->value = val;
return GI_WidgetProgressSet(this->hWnd, val);
}
int CProgressbar::GetValue() {
return this->value;
}
int CProgressbar::SetColor(COLOR Color) {
this->color = Color;
return GI_WidgetProgressSetColor(this->hWnd, Color);
}
COLOR CProgressbar::GetColor() {
return this->color;
}
int CProgressbar::SetMax(int max) {
this->maximum = max;
return GI_WidgetProgressSetMax(this->hWnd, max);
}
int CProgressbar::GetMax() {
return this->maximum;
}
|