summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2DlgItemOK.cpp
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2023-06-28 22:22:32 +0100
committerAsh Wolf <ninji@wuffs.org>2023-06-28 22:22:32 +0100
commitc0c336500955a23e344651e5412c9d9d441ef4ee (patch)
tree790769c748db307cf3314f6e896e2f61c68561a2 /src/T2DLL/T2DlgItemOK.cpp
parent37e364b2c6cc7487a1c888d256a73e5337bb7189 (diff)
downloadt2win-c0c336500955a23e344651e5412c9d9d441ef4ee.tar.gz
t2win-c0c336500955a23e344651e5412c9d9d441ef4ee.zip
first pass of T2DLL
Diffstat (limited to '')
-rw-r--r--src/T2DLL/T2DlgItemOK.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/T2DLL/T2DlgItemOK.cpp b/src/T2DLL/T2DlgItemOK.cpp
index 287d992..3f1cdf6 100644
--- a/src/T2DLL/T2DlgItemOK.cpp
+++ b/src/T2DLL/T2DlgItemOK.cpp
@@ -1,7 +1,16 @@
#include "T2DlgItemOK.h"
-T2DlgItemOK::T2DlgItemOK(T2TowerDoc*, T2ImageObj*, CPalette*) {
+T2DlgItemOK::T2DlgItemOK(T2TowerDoc* inDoc, T2ImageObj* inImageObj, CPalette* inPalette)
+ : T2DlgItemIButton(inDoc, inImageObj, inPalette)
+{
}
-/*virtual*/ int T2DlgItemOK::Create(const char*, unsigned long, const RECT&, CWnd*, unsigned int) {
+/*virtual*/ BOOL T2DlgItemOK::Create(const char* windowName, DWORD style, const RECT& rect, CWnd* parentWnd, UINT nId) {
+ CRect rectToUse = rect;
+ CRect imageRect;
+ GetObjectImage(imageRect, "DLGITEM:OK");
+
+ rectToUse.right = rectToUse.left + imageRect.Width();
+ rectToUse.bottom = rectToUse.top + imageRect.Height();
+ return T2DlgItem::Create("DLGITEM:OK", style, rectToUse, parentWnd, nId);
}