summaryrefslogtreecommitdiff
path: root/src/T2MWControl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/T2MWControl.cpp')
-rw-r--r--src/T2MWControl.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/T2MWControl.cpp b/src/T2MWControl.cpp
index a6527f1..205827e 100644
--- a/src/T2MWControl.cpp
+++ b/src/T2MWControl.cpp
@@ -2,6 +2,12 @@
#include "T2TowerDoc.h"
#include "T2WorldDef.h"
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
#line 19
IMPLEMENT_DYNCREATE(T2MWControl, CWnd)
@@ -30,8 +36,10 @@ END_MESSAGE_MAP()
}
afx_msg BOOL T2MWControl::OnEraseBkgnd(CDC* pDC) {
- if (mWorldDef)
- mWorldDef->DrawCtrl(mDocument, this);
+ if (!mWorldDef)
+ return true;
+
+ mWorldDef->DrawCtrl(mDocument, this);
return true;
}
@@ -60,7 +68,8 @@ afx_msg void T2MWControl::OnLButtonUp(UINT nFlags, CPoint point) {
afx_msg void T2MWControl::OnMouseMove(UINT nFlags, CPoint point) {
if (mWorldDef) {
- HCURSOR cursor = AfxGetApp()->LoadStandardCursor(IDC_ARROW);
+ CWinApp *theApp = AfxGetApp();
+ HCURSOR cursor = theApp->LoadStandardCursor(IDC_ARROW);
if (cursor)
SetCursor(cursor);