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

📄 ex6_1doc.cpp

📁 This is Visual C++ basis operation. Using that you can fast go in study.
💻 CPP
字号:
// Ex6_1Doc.cpp : implementation of the CEx6_1Doc class
//

#include "stdafx.h"
#include "Ex6_1.h"

#include "Ex6_1Doc.h"

#include  "UpdateDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CEx6_1Doc

IMPLEMENT_DYNCREATE(CEx6_1Doc, CDocument)

BEGIN_MESSAGE_MAP(CEx6_1Doc, CDocument)
	//{{AFX_MSG_MAP(CEx6_1Doc)
	ON_COMMAND(ID_SETUP, OnSetup)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CEx6_1Doc construction/destruction

CEx6_1Doc::CEx6_1Doc()
{
	// TODO: add one-time construction code here
  m_iPoint=-1;	
  m_type=0;	
  m_MouseMsg="请双击鼠标左键";
}

CEx6_1Doc::~CEx6_1Doc()
{
}

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

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

	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CEx6_1Doc serialization

void CEx6_1Doc::Serialize(CArchive& ar)
{
	if (ar.IsStoring())
	{
		// TODO: add storing code here
	}
	else
	{
		// TODO: add loading code here
	}
}

/////////////////////////////////////////////////////////////////////////////
// CEx6_1Doc diagnostics

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

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

/////////////////////////////////////////////////////////////////////////////
// CEx6_1Doc commands

void CEx6_1Doc::OnSetup() 
{
	// TODO: Add your command handler code here
	CUpdateDlg dlg; //创建一个CUpdateDlg对话框类的对象
	//初始化对话框对象	
	dlg.m_Msg=m_MouseMsg;	
	dlg.m_type_edit=m_type;   //调用对话框	
	if(dlg.DoModal()==IDOK )	
	{
		//按用户输入来修改文档类成员变量
		m_MouseMsg=dlg.m_Msg ;	 
		m_type=dlg.m_type_edit;	 
		this->UpdateAllViews(NULL); //更新视图	
	}
	
}

⌨️ 快捷键说明

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