sinstance.h

来自「远程网络监视程序的源码」· C头文件 代码 · 共 41 行

H
41
字号
/*
Module : SINSTANCE.H
Purpose: Defines the interface for an MFC wrapper classe
         to do instance checking
Created: PJN / 29-07-1998
History: None

Copyright (c) 1998 by PJ Naughter.  
All rights reserved.

*/

#ifndef __SINSTANCE_H__
#define __SINSTANCE_H__


#ifndef __AFXMT_H__
#pragma error("CInstanceChecker class requires afxmt.h in your PCH")
#endif


class CInstanceChecker : public CObject
{
public:
	//Constructors / Destructors
	CInstanceChecker(LPCTSTR szAppName = NULL);
	~CInstanceChecker();

	//General functions
	BOOL InstanceIsRunning();
	void ActivatePrevInstance(); 
	void SaveHwnd(HWND hWnd);

protected:
	CString m_sMMF;
	CMutex m_mutexInstance;
	HANDLE m_hPrevMMF;
};


#endif //__SINSTANCE_H__

⌨️ 快捷键说明

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