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

📄 bwchess.cpp

📁 这是我用vc编写的一个黑白棋网络游戏的使用程序
💻 CPP
字号:
// BWChess.cpp : Defines the class behaviors for the application.
//

#include "stdafx.h"
#include "BWChess.h"
#include "BWChessDlg.h"
#include "HelperAPI.h"

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

/////////////////////////////////////////////////////////////////////////////
// CBWChessApp  本程序的核心应用程序对象

BEGIN_MESSAGE_MAP(CBWChessApp, CWinApp)
	//{{AFX_MSG_MAP(CBWChessApp)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CBWChessApp construction

CBWChessApp::CBWChessApp()
{
	// TODO: add construction code here,
	// Place all significant initialization in InitInstance
}

/////////////////////////////////////////////////////////////////////////////
// The one and only CBWChessApp object

CBWChessApp theApp;//程序从此处开始执行,先构造应用程序对象,再作相应的初始化

/////////////////////////////////////////////////////////////////////////////
// CBWChessApp initialization

BOOL CBWChessApp::InitInstance()
{
	HANDLE hMutex=::CreateMutex(NULL,FALSE,_T("bwchessmadebyshuker1228"));
// “CreateMutex” 创建一个 互斥的mutex object对象 ,字符串为对象的名字
	if(GetLastError()==ERROR_ALREADY_EXISTS)
	{//GetLastError() 检查是否已有该程序在运行(ERROR_ALREADY_EXISTS),若有则终止本程序!
		//MsgBox(IDS_ERROR_ALREADY_EXIST,IDS_TITLE_CHINESE);
		//return FALSE;
	}

//	AfxEnableControlContainer();



	SetRegistryKey(_T("Spray Soft"));//在注册表里加入相应的信息
//	this->SetDialogBkColor (RGB(255,255,255));

	CBWChessDlg dlg;
	m_pMainWnd = &dlg;
	dlg.DoModal();

	::CloseHandle (hMutex);
	return FALSE;
}

⌨️ 快捷键说明

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