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

📄 bin251.bin

📁 BCGCBDotNetExample 修改后的通用模板
💻 BIN
字号:
// This code illustrates using IntelliSense features with CBCGPEditCtrl class
// Note at comments in body of main() function to understand how does it work!

#include "stdafx.h"

#include <windows.h>
#include <stdio.h>
#include <conio.h>

class CMyClass
{
public:
	CMyClass(int argc, char* argv[])
	{
		m_argv = new char*[m_argc = argc];

		for (int ind = -1; ++ind < argc; m_argv[ind] = strdup(argv[ind]));

		m_bTrace = FALSE;
	}

	~CMyClass()
	{
		OnDestroy();

		for (int ind = -1; ++ind < m_argc; free(m_argv[ind]));

		delete[] m_argv;
	}

	int DoMain()
	{
		if (m_bTrace)
		{
			printf("CMyClass::DoMain ()\n");
		}

		return 0;
	}

	const char* GetAppName() const
	{
		return m_argv[0];
	}

	void EnableTrace(BOOL bTrace = TRUE)
	{
		m_bTrace = bTrace;
	}

protected:
	BOOL m_bTrace;

	virtual void OnDestroy()
	{
		if (m_bTrace)
		{
			printf("CMyClass::OnDestroy ()\n");
		}

		getch();
	}

private:
	int m_argc;
	char** m_argv;
};

int main(int argc, char* argv[])
// The entry point for the console application.
{
	CMyClass myClass(argc, argv);

	printf("%s\n", myClass.GetAppName());

//	Type myClass and strike '.' to select EnableTrace() from myClass member list

//	myClass.EnableTrace();
	
	return myClass.DoMain();
}

⌨️ 快捷键说明

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