diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-06-28 22:22:32 +0100 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-06-28 22:22:32 +0100 |
commit | c0c336500955a23e344651e5412c9d9d441ef4ee (patch) | |
tree | 790769c748db307cf3314f6e896e2f61c68561a2 /src/T2DLL/T2DlgItemProgress.cpp | |
parent | 37e364b2c6cc7487a1c888d256a73e5337bb7189 (diff) | |
download | t2win-c0c336500955a23e344651e5412c9d9d441ef4ee.tar.gz t2win-c0c336500955a23e344651e5412c9d9d441ef4ee.zip |
first pass of T2DLL
Diffstat (limited to '')
-rw-r--r-- | src/T2DLL/T2DlgItemProgress.cpp | 51 |
1 files changed, 45 insertions, 6 deletions
diff --git a/src/T2DLL/T2DlgItemProgress.cpp b/src/T2DLL/T2DlgItemProgress.cpp index 75bf2ac..d82088a 100644 --- a/src/T2DLL/T2DlgItemProgress.cpp +++ b/src/T2DLL/T2DlgItemProgress.cpp @@ -1,28 +1,67 @@ #include "T2DlgItemProgress.h" -T2DlgItemProgress::T2DlgItemProgress(T2TowerDoc*, T2ImageObj*, CPalette*) { +T2DlgItemProgress::T2DlgItemProgress(T2TowerDoc* inDoc, T2ImageObj* inImageObj, CPalette* inPalette) + : T2DlgItem(inDoc, inImageObj, inPalette) + , mSubItem(NULL) +{ } /*virtual*/ T2DlgItemProgress::~T2DlgItemProgress() { + delete mSubItem; } -/*virtual*/ void T2DlgItemProgress::SetFont(HFONT) { +/*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, int) { +/*virtual*/ void T2DlgItemProgress::SetRange(int inLower, int inUpper) { + if (mSubItem) + mSubItem->SetRange(inLower, inUpper); } -/*virtual*/ int T2DlgItemProgress::SetPos(int) { +/*virtual*/ int T2DlgItemProgress::SetPos(int inPos) { + int result; + if (mSubItem) + result = mSubItem->SetPos(inPos); + else + result = 0; + return result; } -/*virtual*/ int T2DlgItemProgress::OffsetPos(int) { +/*virtual*/ int T2DlgItemProgress::OffsetPos(int inOffset) { + int result; + if (mSubItem) + result = mSubItem->OffsetPos(inOffset); + else + result = 0; + return result; } -/*virtual*/ int T2DlgItemProgress::SetStep(int) { +/*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; } |