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

📄 mfcsaver.h

📁 用C++编写的屏幕保护程序,方便C语言及C++初学者学习交流
💻 H
字号:
// MfcSaver.h : main header file for the MFCSAVER application
//

#ifndef __MFCSAVER_H__
#define __MFCSAVER_H__

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"
#include "afxtempl.h"
/////////////////////////////////////////////////////////////////////////////

#include "ScreenSaverWnd.h"

class CMfcSaver : public CScreenSaverWnd
{
// Construction
public:
	CMfcSaver();

// Attributes
protected:

	struct _icon { int iImage; CPoint ptP; CSize szV; int nStuck; };

	CImageList m_ilIcons;
	CArray<_icon,_icon&> m_aIcon;
	int m_nIcons;
	int m_nSpeed;
public:
	int GetIconCount() const;
	void SetIconCount(int nIcons);
	//
	int GetIconSpeed() const;
	void SetIconSpeed(int nSpeed);

// Operations
public:
	void EraseMfcSaverIcon(int i, CDC* pDC);
	BOOL IsMfcSaverIconColliding(int i, CPoint ptP);
	BOOL IsMfcSaverIconOffscreen(int i);
	void UpdateMfcSaverIconPosition(int i);
	void DrawMfcSaverIcon(int i, CDC* pDC);
	void BounceMfcSaverIcon(int i);
	void SetupMfcSaverIcon(int i);

// Overrides
public:
	virtual void OnDraw(CDC* pDC);
	virtual void OnInitialUpdate();
	virtual void SaveOptions();
	virtual void RestoreOptions();
	//{{AFX_VIRTUAL(CMfcSaver)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CMfcSaver();

protected:
	//{{AFX_MSG(CMfcSaver)
	afx_msg void OnTimer(UINT nIDEvent);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

#endif // __MFCSAVER_H__

⌨️ 快捷键说明

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