From 5c6a48b2ff362a70416a6a00fda7d06e0f276f2d Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Sat, 1 Jul 2023 02:43:29 +0100 Subject: i am in hell --- src/T2DLL/T2DlgItemIButton.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/T2DLL/T2DlgItemIButton.cpp') diff --git a/src/T2DLL/T2DlgItemIButton.cpp b/src/T2DLL/T2DlgItemIButton.cpp index 3aa923a..4d39112 100644 --- a/src/T2DLL/T2DlgItemIButton.cpp +++ b/src/T2DLL/T2DlgItemIButton.cpp @@ -2,12 +2,19 @@ #include "T2BitImage.h" #include "T2DlgItemIButton.h" +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + T2DlgItemIButton::T2DlgItemIButton(T2TowerDoc* inDoc, T2ImageObj* inImageObj, CPalette* inPalette) : T2DlgItemButtonBase(inDoc, inImageObj, inPalette) { } /*virtual*/ BOOL T2DlgItemIButton::OnT2DlgItemEraseBkgnd(CDC* pDC) { +#pragma var_order(imageRect, rect30, clientRect, newDC, image, save3, save2, text, save, rect74, brush, bitmap, hbitmap) CRect clientRect; GetClientRect(clientRect); @@ -26,11 +33,11 @@ T2DlgItemIButton::T2DlgItemIButton(T2TowerDoc* inDoc, T2ImageObj* inImageObj, CP rect30.left = (clientRect.Width() - imageRect.Width()) / 2; rect30.top = (clientRect.Height() - imageRect.Height()) / 2; rect30.right = rect30.left + imageRect.Width(); - rect30.bottom = rect30.bottom + imageRect.Height(); + rect30.bottom = rect30.top + imageRect.Height(); int save2 = pDC->SaveDC(); CRect rect74 = imageRect; - OffsetRect(&rect74, -imageRect.left, -imageRect.top); + OffsetRect(&rect74, -rect74.left, -rect74.top); CDC newDC; newDC.CreateCompatibleDC(pDC); -- cgit v1.2.3