|
// ResProjView.cpp : implementation of the CResProjView class
//
#include "stdafx.h"
#include "ResProj.h"
#include "ResProjDoc.h"
#include "ResProjView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CResProjView
IMPLEMENT_DYNCREATE(CResProjView, CHtmlView)
BEGIN_MESSAGE_MAP(CResProjView, CHtmlView)
//{{AFX_MSG_MAP(CResProjView)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CHtmlView::OnFilePrint)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CResProjView construction/destruction
CResProjView::CResProjView()
{
// TODO: add construction code here
}
CResProjView::~CResProjView()
{
}
BOOL CResProjView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CHtmlView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CResProjView drawing
void CResProjView::OnDraw(CDC* pDC)
{
CResProjDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
void CResProjView::OnInitialUpdate()
{
CHtmlView::OnInitialUpdate();
// Use The LoadFromResource function
// In the HTML File to locate resource in
// your app add the file by name and in binary format
// of type 2110 ( Magic Number for Microsoft)
// HTML files are placed automatically under
// category of type HTML
LoadFromResource(IDR_STARTHTML);
}
/////////////////////////////////////////////////////////////////////////////
// CResProjView printing
/////////////////////////////////////////////////////////////////////////////
// CResProjView diagnostics
#ifdef _DEBUG
void CResProjView::AssertValid() const
{
CHtmlView::AssertValid();
}
void CResProjView::Dump(CDumpContext& dc) const
{
CHtmlView::Dump(dc);
}
CResProjDoc* CResProjView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CResProjDoc)));
return (CResProjDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CResProjView message handlers
void CResProjView::OnTitleChange(LPCTSTR lpszText)
{
CDocument *pDoc = GetDocument();
if(pDoc)
pDoc->SetTitle(lpszText);
CHtmlView::OnTitleChange(lpszText);
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.