Complete disaster-recovery snapshot: engine/game source, game data assets, VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive. Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false, no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
139 lines
3.3 KiB
C++
139 lines
3.3 KiB
C++
// MultitronView.cpp : implementation of the CMultitronView class
|
|
//
|
|
|
|
#include "stdafx.h"
|
|
#include "Multitron.h"
|
|
|
|
#include "MultitronDoc.h"
|
|
#include "MultitronView.h"
|
|
|
|
#ifdef _DEBUG
|
|
#define new DEBUG_NEW
|
|
#undef THIS_FILE
|
|
static char THIS_FILE[] = __FILE__;
|
|
#endif
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CMultitronView
|
|
|
|
IMPLEMENT_DYNCREATE(CMultitronView, CView)
|
|
|
|
BEGIN_MESSAGE_MAP(CMultitronView, CView)
|
|
//{{AFX_MSG_MAP(CMultitronView)
|
|
//}}AFX_MSG_MAP
|
|
// Standard printing commands
|
|
END_MESSAGE_MAP()
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CMultitronView construction/destruction
|
|
|
|
CMultitronView::CMultitronView()
|
|
{
|
|
}
|
|
|
|
CMultitronView::~CMultitronView()
|
|
{
|
|
}
|
|
|
|
BOOL CMultitronView::PreCreateWindow(CREATESTRUCT& cs)
|
|
{
|
|
return CView::PreCreateWindow(cs);
|
|
}
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CMultitronView drawing
|
|
|
|
void CMultitronView::OnDraw(CDC* pDC)
|
|
{
|
|
//CMultitronDoc* pDoc = GetDocument();
|
|
//ASSERT_VALID(pDoc);
|
|
}
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CMultitronView printing
|
|
|
|
BOOL CMultitronView::OnPreparePrinting(CPrintInfo* pInfo)
|
|
{
|
|
// default preparation
|
|
return DoPreparePrinting(pInfo);
|
|
}
|
|
|
|
void CMultitronView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
|
|
{
|
|
}
|
|
|
|
void CMultitronView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
|
|
{
|
|
}
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CMultitronView diagnostics
|
|
|
|
#ifdef _DEBUG
|
|
void CMultitronView::AssertValid() const
|
|
{
|
|
CView::AssertValid();
|
|
}
|
|
|
|
void CMultitronView::Dump(CDumpContext& dc) const
|
|
{
|
|
CView::Dump(dc);
|
|
}
|
|
|
|
CMultitronDoc* CMultitronView::GetDocument() // non-debug version is inline
|
|
{
|
|
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMultitronDoc)));
|
|
return (CMultitronDoc*)m_pDocument;
|
|
}
|
|
#endif //_DEBUG
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CMultitronView message handlers
|
|
|
|
/*******************************************************************************
|
|
/* function name: OnInitialUpdate
|
|
/* description: Called when window is displayed for the first time,
|
|
/* set up window size and position
|
|
/*******************************************************************************/
|
|
void CMultitronView::OnInitialUpdate()
|
|
{
|
|
if (m_dlgMultitron.Create(IDD_MULITRONDOC,this))
|
|
{
|
|
}
|
|
|
|
CRect rc;
|
|
m_dlgMultitron.GetClientRect(&rc);
|
|
|
|
rc.right +=20;
|
|
rc.bottom+=35;
|
|
CWnd *pWnd = GetParent();
|
|
pWnd->MoveWindow(rc);
|
|
|
|
while(pWnd->GetParent())
|
|
pWnd = pWnd->GetParent();
|
|
rc.right+=220;
|
|
rc.bottom+=90;
|
|
pWnd->MoveWindow(rc);
|
|
|
|
CMultitronDoc *pDoc = GetDocument();
|
|
m_dlgMultitron.SetDocument(pDoc);
|
|
}
|
|
|
|
/*******************************************************************************
|
|
/* function name: OnUpdate
|
|
/* description: Called when hosted documents are updated
|
|
/*******************************************************************************/
|
|
void CMultitronView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint)
|
|
{
|
|
switch(lHint) {
|
|
// update the used list
|
|
case 0:
|
|
m_dlgMultitron.UpdateUsedList(pHint);
|
|
break;
|
|
// update the unused list
|
|
case 1:
|
|
m_dlgMultitron.UpdateUnusedList(pHint);
|
|
break;
|
|
}
|
|
}
|