📄 ppbutton.h
字号:
#ifndef __GUIPP_BUTTON_H__
#define __GUIPP_BUTTON_H__
#if _USE_GUI == 1
#include "Guipp.h"
// 按钮
#define BUTTON_OK_WIDTH16 84 // 按钮宽度
#define BUTTON_CANCEL_WIDTH16 84
#define BUTTON_HEIGHT_16 24
#define BUTTON_STYLE_NORMAL 0x01
#define BUTTON_STYLE_FLAT 0x02
class NANAButton : public NANAWnd
{
private:
int w_bPressed; // 按下状态
const char * w_strCaption; // 标题
int w_nIcon; // 图标
int w_StyleEx;
int w_nCaptionID; // 用于支持多语言
public:
NANAButton()
{
w_bPressed = 0;
w_strCaption = NULL;
w_nIcon = -1;
w_StyleEx = BUTTON_STYLE_NORMAL;
w_nCaptionID = -1;
}
void SetCaption(const char * pStrCaption);
void SetIcon(int nIcon); //ICON button will display both Icon and text(if it has)
void SetPress(int bPress);
void SetStyleEx(int style)
{
w_StyleEx = style;
}
protected:
virtual void OnPaint();
virtual void OnMouseDown(int x,int y);
virtual void OnMouseUp(int x,int y);
};
#endif
#endif //!__GUIPP_BUTTON_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -