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

📄 a.cpp

📁 主要传递文档类指针
💻 CPP
字号:
// A.cpp : 实现文件
//

#include "stdafx.h"
#include "test1.h"
#include "A.h"
#include ".\a.h"

//#include "test1View.h"

// CA

IMPLEMENT_DYNAMIC(CA, CWnd)
CA::CA()
{
	//c=1;
	//d=2;
}

CA::CA(Ctest1Doc* pDoc)
{
	//c=1;
	//d=2;
//	m_pDoc=pDoc;
}

CA::~CA()
{
}


BEGIN_MESSAGE_MAP(CA, CWnd)
END_MESSAGE_MAP()



// CA 消息处理程序


void CA::Ceshi(Ctest1Doc* pDoc)
{
	//Ctest1View myView;
	//myView.a=1;
	//myView.b=2;
	//pDoc=new Ctest1Doc;
	//pDoc->a=3;
	//pDoc->b=4;
	//int f=pDoc->b;
	////pDoc.a=3;
	////pDoc.b=4;
	////int f=pDoc.b;
	////int f;
	m_pDoc=pDoc;
	m_pDoc->a=10;
	int f=m_pDoc->a;
	CString str;
	str.Format("%d",f);
	AfxMessageBox(str);
}

⌨️ 快捷键说明

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