2013-03-15 13:11:33 +00:00
|
|
|
namespace phoenix {
|
|
|
|
|
|
|
|
Size pProgressBar::minimumSize() {
|
|
|
|
return {0, 23};
|
2011-03-22 12:56:49 +00:00
|
|
|
}
|
|
|
|
|
2011-02-24 09:25:20 +00:00
|
|
|
void pProgressBar::setPosition(unsigned position) {
|
|
|
|
SendMessage(hwnd, PBM_SETPOS, (WPARAM)position, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
void pProgressBar::constructor() {
|
2011-09-05 03:48:23 +00:00
|
|
|
hwnd = CreateWindow(PROGRESS_CLASS, L"", WS_CHILD | PBS_SMOOTH, 0, 0, 0, 0, parentWindow->p.hwnd, (HMENU)id, GetModuleHandle(0), 0);
|
2011-02-24 09:25:20 +00:00
|
|
|
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)&progressBar);
|
|
|
|
SendMessage(hwnd, PBM_SETRANGE, 0, MAKELPARAM(0, 100));
|
|
|
|
SendMessage(hwnd, PBM_SETSTEP, MAKEWPARAM(1, 0), 0);
|
|
|
|
setPosition(progressBar.state.position);
|
2011-09-05 03:48:23 +00:00
|
|
|
synchronize();
|
|
|
|
}
|
|
|
|
|
|
|
|
void pProgressBar::destructor() {
|
|
|
|
DestroyWindow(hwnd);
|
|
|
|
}
|
|
|
|
|
|
|
|
void pProgressBar::orphan() {
|
|
|
|
destructor();
|
|
|
|
constructor();
|
2011-02-24 09:25:20 +00:00
|
|
|
}
|
2013-03-15 13:11:33 +00:00
|
|
|
|
|
|
|
}
|