From c0c336500955a23e344651e5412c9d9d441ef4ee Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Wed, 28 Jun 2023 22:22:32 +0100 Subject: first pass of T2DLL --- src/T2DLL/T2DlgItemCANCEL.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/T2DLL/T2DlgItemCANCEL.cpp') diff --git a/src/T2DLL/T2DlgItemCANCEL.cpp b/src/T2DLL/T2DlgItemCANCEL.cpp index 4c5d193..8b0a197 100644 --- a/src/T2DLL/T2DlgItemCANCEL.cpp +++ b/src/T2DLL/T2DlgItemCANCEL.cpp @@ -1,7 +1,16 @@ #include "T2DlgItemCANCEL.h" -T2DlgItemCANCEL::T2DlgItemCANCEL(T2TowerDoc*, T2ImageObj*, CPalette*) { +T2DlgItemCANCEL::T2DlgItemCANCEL(T2TowerDoc* inDoc, T2ImageObj* inImageObj, CPalette* inPalette) + : T2DlgItemIButton(inDoc, inImageObj, inPalette) +{ } -/*virtual*/ int T2DlgItemCANCEL::Create(const char*, unsigned long, const RECT&, CWnd*, unsigned int) { +/*virtual*/ BOOL T2DlgItemCANCEL::Create(const char* windowName, DWORD style, const RECT& rect, CWnd* parentWnd, UINT nId) { + CRect rectToUse = rect; + CRect imageRect; + GetObjectImage(imageRect, "DLGITEM:Cancel"); + + rectToUse.right = rectToUse.left + imageRect.Width(); + rectToUse.bottom = rectToUse.top + imageRect.Height(); + return T2DlgItem::Create("DLGITEM:Cancel", style, rectToUse, parentWnd, nId); } -- cgit v1.2.3