?? zscasmeditordoc.cpp
字號:
// ZSCAsmEditorDoc.cpp : implementation file
//
#include "stdafx.h"
#include <Tlhelp32.h>
#include <winperf.h>
#include <shlguid.h>
#include <shlobj.h>
#include <tchar.h>
#include "zscpascal.h"
#include "ZSCAsmEditorDoc.h"
#include "ZSCAsmEditorView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CZSCAsmEditorDoc
IMPLEMENT_DYNCREATE(CZSCAsmEditorDoc, CDocument)
CZSCAsmEditorDoc::CZSCAsmEditorDoc()
{
memset(&m_lf, 0, sizeof(m_lf));
m_lf.lfWeight = FW_NORMAL;
m_lf.lfCharSet = ANSI_CHARSET;
m_lf.lfOutPrecision = OUT_DEFAULT_PRECIS;
m_lf.lfClipPrecision = CLIP_DEFAULT_PRECIS;
m_lf.lfQuality = DEFAULT_QUALITY;
m_lf.lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
strcpy(m_lf.lfFaceName, "Courier");
}
BOOL CZSCAsmEditorDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
((CCrystalEditView*)m_viewList.GetHead())->SetWindowText("");
m_TextBuffer.InitNew();
return TRUE;
}
CZSCAsmEditorDoc::~CZSCAsmEditorDoc()
{
}
BEGIN_MESSAGE_MAP(CZSCAsmEditorDoc, CDocument)
//{{AFX_MSG_MAP(CZSCAsmEditorDoc)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CZSCAsmEditorDoc diagnostics
#ifdef _DEBUG
void CZSCAsmEditorDoc::AssertValid() const
{
CDocument::AssertValid();
}
void CZSCAsmEditorDoc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CZSCAsmEditorDoc serialization
void CZSCAsmEditorDoc::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
// TODO: add storing code here
}
else
{
// TODO: add loading code here
}
}
/////////////////////////////////////////////////////////////////////////////
// CZSCAsmEditorDoc commands
BOOL CZSCAsmEditorDoc::OnOpenDocument(LPCTSTR lpszPathName)
{
if (!CDocument::OnOpenDocument(lpszPathName))
return FALSE;
// TODO: Add your specialized creation code here
return m_TextBuffer.LoadFromFile(lpszPathName);
}
BOOL CZSCAsmEditorDoc::OnSaveDocument(LPCTSTR lpszPathName)
{
// TODO: Add your specialized code here and/or call the base class
m_TextBuffer.SaveToFile(lpszPathName);
return TRUE; // Note - we didn't call inherited member!
}
void CZSCAsmEditorDoc::DeleteContents()
{
// TODO: Add your specialized code here and/or call the base class
CDocument::DeleteContents();
m_TextBuffer.FreeAll();
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -