readme.wzd

来自「MFC扩展编程实例」· WZD 代码 · 共 33 行

WZD
33
字号
/////////////////////////////////////////////////////////////////////
// Modify the Application Class.
/////////////////////////////////////////////////////////////////////

// 1) define a unique string (use the guidgen.exe application in MFC's \bin)
#define UNIQUE_NAME "{F5EFF561-ECB3-11d1-A18D-DCB3C85EBD34}"

// 2) first thing in the InitInstance() function, open a mutex
BOOL CWzdApp::InitInstance()
{
	m_hOneInstance=::CreateMutex(NULL,FALSE,UNIQUE_NAME);
	if (GetLastError()==ERROR_ALREADY_EXISTS)
	{
		AfxMessageBox("Application already running!");
		return FALSE;
	}

	:	:	:
}

// 3) close mutex when application terminates 
int CWzdApp::ExitInstance() 
{
	CloseHandle(m_hOneInstance);	
	return CWinApp::ExitInstance();
}

/////////////////////////////////////////////////////////////////////
// From: Visual C++ MFC Programming by Example by John E. Swanke
// Copyright (C) 1999 jeswanke. All rights reserved.
/////////////////////////////////////////////////////////////////////

⌨️ 快捷键说明

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