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

📄 ex24adoc.cpp

📁 不好意思
💻 CPP
字号:
// Ex24aDoc.cpp : implementation of the CEx24aDoc class
//

#include "stdafx.h"
#include "Ex24a.h"

#include "Ex24aDoc.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CEx24aDoc

IMPLEMENT_DYNCREATE(CEx24aDoc, CDocument)

BEGIN_MESSAGE_MAP(CEx24aDoc, CDocument)
    ON_COMMAND(ID_EDIT_CLEARALL, OnEditClearall)
    ON_UPDATE_COMMAND_UI(ID_EDIT_CLEARALL, OnUpdateEditClearall)
END_MESSAGE_MAP()


// CEx24aDoc construction/destruction

CEx24aDoc::CEx24aDoc()
{
	// TODO: add one-time construction code here

}

CEx24aDoc::~CEx24aDoc()
{
}

BOOL CEx24aDoc::OnNewDocument()
{
	if (!CDocument::OnNewDocument())
		return FALSE;

	// TODO: add reinitialization code here
	// (SDI documents will reuse this document)

	return TRUE;
}




// CEx24aDoc serialization

void CEx24aDoc::Serialize(CArchive& ar)
{
   m_dib.Serialize(ar);
}


// CEx24aDoc diagnostics

#ifdef _DEBUG
void CEx24aDoc::AssertValid() const
{
	CDocument::AssertValid();
}

void CEx24aDoc::Dump(CDumpContext& dc) const
{
	CDocument::Dump(dc);
}
#endif //_DEBUG


// CEx24aDoc commands

void CEx24aDoc::OnEditClearall()
{
    DeleteContents();
    UpdateAllViews(NULL);
    SetModifiedFlag();
}

void CEx24aDoc::OnUpdateEditClearall(CCmdUI *pCmdUI)
{
    pCmdUI->Enable(m_dib.GetSizeImage() > 0);   
}

void CEx24aDoc::DeleteContents()
{
   m_dib.Empty();
}

⌨️ 快捷键说明

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