mybutton.h
来自「一个用vc做的挖金子的游戏」· C头文件 代码 · 共 47 行
H
47 行
#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 + =
减小字号Ctrl + -
显示快捷键?