blob: 752759ce2cf52fca607bbc2be1e407dd92ac2a08 (
plain)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
#include "StdAfx.h"
#include "T2DlgItemProgress.h"
T2DlgItemProgress::T2DlgItemProgress(T2TowerDoc* inDoc, T2ImageObj* inImageObj, CPalette* inPalette)
: T2DlgItem(inDoc, inImageObj, inPalette)
, mSubItem(NULL)
{
}
/*virtual*/ T2DlgItemProgress::~T2DlgItemProgress() {
delete mSubItem;
}
/*virtual*/ void T2DlgItemProgress::SetFont(HFONT inFont) {
T2DlgItem::SetFont(inFont);
if (mSubItem)
mSubItem->SetFont(CFont::FromHandle(inFont));
}
/*virtual*/ void T2DlgItemProgress::CreateSubItem() {
mSubItem = new CProgressCtrl;
CRect rect;
GetClientRect(rect);
mSubItem->Create(WS_VISIBLE | WS_CHILD, rect, this, 0);
}
/*virtual*/ void T2DlgItemProgress::SetRange(int inLower, int inUpper) {
if (mSubItem)
mSubItem->SetRange(inLower, inUpper);
}
/*virtual*/ int T2DlgItemProgress::SetPos(int inPos) {
int result;
if (mSubItem)
result = mSubItem->SetPos(inPos);
else
result = 0;
return result;
}
/*virtual*/ int T2DlgItemProgress::OffsetPos(int inOffset) {
int result;
if (mSubItem)
result = mSubItem->OffsetPos(inOffset);
else
result = 0;
return result;
}
/*virtual*/ int T2DlgItemProgress::SetStep(int inStep) {
int result;
if (mSubItem)
result = mSubItem->SetStep(inStep);
else
result = 0;
return result;
}
/*virtual*/ int T2DlgItemProgress::StepIt() {
int result;
if (mSubItem)
result = mSubItem->StepIt();
else
result = 0;
return result;
}
|