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/T2ToolWindow.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'src/T2DLL/T2ToolWindow.cpp') diff --git a/src/T2DLL/T2ToolWindow.cpp b/src/T2DLL/T2ToolWindow.cpp index 08ade6c..346f1e8 100644 --- a/src/T2DLL/T2ToolWindow.cpp +++ b/src/T2DLL/T2ToolWindow.cpp @@ -1,5 +1,5 @@ #include "CT2App.h" -#include "GlobalFunc.h" +#include "T2DLL.h" #include "T2ImageObj.h" #include "T2MainWindow.h" #include "T2TemplatePluginList.h" @@ -8,15 +8,18 @@ #include "T2TowerDoc.h" #include "T2WorldDef.h" -CObject* PASCAL T2ToolWindow::CreateObject() { +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + #line 16 - return DEBUG_NEW T2ToolWindow; -} -IMPLEMENT_DYNAMIC(T2ToolWindow, CFrameWnd); +IMPLEMENT_DYNCREATE(T2ToolWindow, CFrameWnd); T2ToolWindow::T2ToolWindow() { #line 20 - mToolIconList = DEBUG_NEW T2ToolIconList; + mToolIconList = new T2ToolIconList; mDocument = NULL; mWorldDef = NULL; @@ -48,6 +51,7 @@ BEGIN_MESSAGE_MAP(T2ToolWindow, CFrameWnd) ON_WM_MOUSEMOVE() ON_WM_LBUTTONDBLCLK() ON_WM_TIMER() + ON_WM_SIZE() ON_WM_DESTROY() ON_WM_CLOSE() END_MESSAGE_MAP() @@ -125,7 +129,7 @@ afx_msg int T2ToolWindow::OnCreate(LPCREATESTRUCT lpCreateStruct) { } #line 145 - T2ToolIconItem *theItem = DEBUG_NEW T2ToolIconItem; + T2ToolIconItem *theItem = new T2ToolIconItem; theItem->mID = AssignNewID(); theItem->mName = inName; theItem->mValiation = inValiation; @@ -179,7 +183,7 @@ afx_msg int T2ToolWindow::OnCreate(LPCREATESTRUCT lpCreateStruct) { /*virtual*/ void T2ToolWindow::RemoveAll() { delete mToolIconList; #line 204 - mToolIconList = DEBUG_NEW T2ToolIconList; + mToolIconList = new T2ToolIconList; ListUpdated(); SelChange(1); @@ -555,7 +559,7 @@ afx_msg void T2ToolWindow::OnDestroy() { ); #line 615 - mListCtrl = DEBUG_NEW CListCtrl; + mListCtrl = new CListCtrl; mListCtrl->Create( LVS_REPORT | LVS_SINGLESEL | WS_VSCROLL | WS_VISIBLE | WS_CHILD, -- cgit v1.2.3