myinterface.cpp

来自「VC++编程技巧典型案例解析——基础与应用」· C++ 代码 · 共 43 行

CPP
43
字号
// MyInterface.cpp: implementation of the CMyInterface class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "MyInterface.h"

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

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CMyInterface::CMyInterface()
{
	m_pMyClass = new CMyClass;
}

CMyInterface::~CMyInterface()
{
	delete m_pMyClass;
}
//--------------------调用CMyClass中的FunctionA函数-----------------
CString CMyInterface::FunctionA()
{
	return m_pMyClass->FunctionA();
}
//--------------------调用CMyClass中的FunctionB函数-----------------
CString CMyInterface::FunctionB()
{
	return m_pMyClass->FunctionB();
}
//--------------------得到CMyClass中的str变量-----------------------
CString CMyInterface::GetString()
{
	return m_pMyClass->str1;
}
//--------------------------The End---------------------------------

⌨️ 快捷键说明

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