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

📄 mybutton.h

📁 一个用vc做的挖金子的游戏
💻 H
字号:
#ifndef __MYBUTTON
#define __MYBUTTON

#include "stdlib.h"

class MYBUTTON
{
public:
	MYBUTTON()
	{
		framenow=0;

		memset(ptext,0,sizeof(ptext));
	}
	~MYBUTTON()
	{
	}	
	void Init(char *p,COLORREF cback1,COLORREF cback2,
		COLORREF ctext1,COLORREF ctext2,HFONT h);
	void SetDC(HDC hdest,HDC hsrc);
	void Show(int x,int y,int iFrame);
	void Show(int x,int y);

	int MouseOver(int x,int y);
	int MouseOut(int x,int y);
	int DetectMouseMove(int x,int y);
	int DetectMouseUp(int x,int y);


private:

	int width;
	int height;
	HDC hdcdest;
	HDC hdcsrc;	
	HFONT hf;

	//当前位置
	int xpos;
	int ypos;
	int framenow;
	SIZE size;
	COLORREF color[4];
	char ptext[50];
};

#endif

⌨️ 快捷键说明

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