⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dwmlscview.cpp

📁 一个反汇编器源码 一个反汇编器源码
💻 CPP
字号:
// DWmlscView.cpp : implementation of the CDWmlscView class
//

#include "stdafx.h"
#include "DWmlsc.h"

#include "DWmlscDoc.h"
#include "DWmlscView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDWmlscView

IMPLEMENT_DYNCREATE(CDWmlscView, CEditView)

BEGIN_MESSAGE_MAP(CDWmlscView, CEditView)
	//{{AFX_MSG_MAP(CDWmlscView)
		// 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()

/////////////////////////////////////////////////////////////////////////////
// CDWmlscView construction/destruction

CDWmlscView::CDWmlscView()
{
	// TODO: add construction code here
	font.CreateFont(16,0,0,0,0,0,0,0,0,0,0,0,0,"Courier new");
}

CDWmlscView::~CDWmlscView()
{
}

BOOL CDWmlscView::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;
}

/////////////////////////////////////////////////////////////////////////////
// CDWmlscView drawing

void CDWmlscView::OnDraw(CDC* pDC)
{
	CDWmlscDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	// TODO: add draw code for native data here
}

/////////////////////////////////////////////////////////////////////////////
// CDWmlscView printing

BOOL CDWmlscView::OnPreparePrinting(CPrintInfo* pInfo)
{
	// default CEditView preparation
	return CEditView::OnPreparePrinting(pInfo);
}

void CDWmlscView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo)
{
	// Default CEditView begin printing.
	CEditView::OnBeginPrinting(pDC, pInfo);
}

void CDWmlscView::OnEndPrinting(CDC* pDC, CPrintInfo* pInfo)
{
	// Default CEditView end printing
	CEditView::OnEndPrinting(pDC, pInfo);
}

/////////////////////////////////////////////////////////////////////////////
// CDWmlscView diagnostics

#ifdef _DEBUG
void CDWmlscView::AssertValid() const
{
	CEditView::AssertValid();
}

void CDWmlscView::Dump(CDumpContext& dc) const
{
	CEditView::Dump(dc);
}

CDWmlscDoc* CDWmlscView::GetDocument() // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CDWmlscDoc)));
	return (CDWmlscDoc*)m_pDocument;
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CDWmlscView message handlers

void CDWmlscView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint) 
{	
	CDWmlscDoc *pDoc = GetDocument();
	CEdit & edit = GetEditCtrl();

	POSITION pos = pDoc->m_result_code.GetHeadPosition();
	while(pos != NULL)
	{
		CString line = pDoc->m_result_code.GetNext(pos);
		CString old_content;
		edit.GetWindowText(old_content);
		edit.SetWindowText(old_content + line + "\r\n");
	}
}

void CDWmlscView::OnInitialUpdate() 
{
	CEditView::OnInitialUpdate();

	CEdit &edit = GetEditCtrl();
	edit.SetFont(&font,TRUE);

	edit.SetReadOnly(TRUE);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -