singleinstanceapp.h
来自「多媒体播放软件代码」· C头文件 代码 · 共 42 行
H
42 行
// SingleInstanceApp.cpp : header file
//
// CWinApp with single-instance support
//
// Copyright (C) 1997, 1998 Giancarlo Iovino (giancarlo@saria.com)
// All rights reserved. May not be sold for profit.
//
// Thanks to Kevin Lussier for the base idea.
//
// This code was developed for MFC Programmers SourceBook
// (http://www.codeguru.com)
//
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h" // main symbols
/////////////////////////////////////////////////////////////////////////////
// CSingleInstanceApp:
//
class CSingleInstanceApp : public CWinApp
{
public:
// Construction/Destruction
CSingleInstanceApp();
~CSingleInstanceApp();
// Operations
BOOL CheckSingleInstance(UINT nID);
CString GetClassName() const;
protected:
HANDLE m_hMutex;
CString m_strClassName;
};
/////////////////////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?