www.pudn.com > aes_encrypt.rar > AESView.cpp


// AESView.cpp : implementation of the CAESView class 
// 
 
#include "stdafx.h" 
#include "AES.h" 
 
#include "AESDoc.h" 
#include "AESView.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CAESView 
 
IMPLEMENT_DYNCREATE(CAESView, CEditView) 
 
BEGIN_MESSAGE_MAP(CAESView, CEditView) 
	//{{AFX_MSG_MAP(CAESView) 
		// 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, CEditView::OnFilePrint) 
	ON_COMMAND(ID_FILE_PRINT_DIRECT, CEditView::OnFilePrint) 
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, CEditView::OnFilePrintPreview) 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// CAESView construction/destruction 
 
CAESView::CAESView() 
{ 
	// TODO: add construction code here 
 
} 
 
CAESView::~CAESView() 
{ 
} 
 
BOOL CAESView::PreCreateWindow(CREATESTRUCT& cs) 
{ 
	// TODO: Modify the Window class or styles here by modifying 
	//  the CREATESTRUCT cs 
 
	BOOL bPreCreated = CEditView::PreCreateWindow(cs); 
	cs.style &= ~(ES_AUTOHSCROLL|WS_HSCROLL);	// Enable word-wrapping 
 
	return bPreCreated; 
} 
 
///////////////////////////////////////////////////////////////////////////// 
// CAESView drawing 
 
void CAESView::OnDraw(CDC* pDC) 
{ 
	CAESDoc* pDoc = GetDocument(); 
	ASSERT_VALID(pDoc); 
	// TODO: add draw code for native data here 
} 
 
///////////////////////////////////////////////////////////////////////////// 
// CAESView printing 
 
BOOL CAESView::OnPreparePrinting(CPrintInfo* pInfo) 
{ 
	// default CEditView preparation 
	return CEditView::OnPreparePrinting(pInfo); 
} 
 
void CAESView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo) 
{ 
	// Default CEditView begin printing. 
	CEditView::OnBeginPrinting(pDC, pInfo); 
} 
 
void CAESView::OnEndPrinting(CDC* pDC, CPrintInfo* pInfo) 
{ 
	// Default CEditView end printing 
	CEditView::OnEndPrinting(pDC, pInfo); 
} 
 
///////////////////////////////////////////////////////////////////////////// 
// CAESView diagnostics 
 
#ifdef _DEBUG 
void CAESView::AssertValid() const 
{ 
	CEditView::AssertValid(); 
} 
 
void CAESView::Dump(CDumpContext& dc) const 
{ 
	CEditView::Dump(dc); 
} 
 
CAESDoc* CAESView::GetDocument() // non-debug version is inline 
{ 
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CAESDoc))); 
	return (CAESDoc*)m_pDocument; 
} 
#endif //_DEBUG 
 
///////////////////////////////////////////////////////////////////////////// 
// CAESView message handlers