📄 ppmessagebox.h
字号:
#ifndef __GUIPP_MESSAGE_BOX_H__
#define __GUIPP_MESSAGE_BOX_H__
#include "GUIpp.h"
#include "ppButton.h"
#if _USE_GUI == 1
//////////////////////////////////////////////////////////////////////
// 对话框
////////对话框风格
#define UGMB_OK 0x01 // 只有一个是按键
#define UGMB_YESNO 0x02 // 有是和否按键
#define UGMB_OKCANCEL 0x03 // 有确定 取消按键
/////// 在窗体上显示的图标
#define UGMB_ICONWARNING 0
#define UGMB_ICONQUESTION 1
#define UGMB_ICONSTOP 2
#define UGMB_ICONINFORMATION 3
#define UGMB_MAX_TITLE_CHARS 40
#define UGMB_MAX_TEXT_CHARS 100
///////窗体返回消息值
#define UGMB_NOTIFY_OK 1
#define UGMB_NOTIFY_CANCEL 2
#define UGMB_KEY_OK 1
#define UGMB_KEY_CANCEL 4
class NANAMessageBox : public NANAWnd
{
private:
int w_nIcon;
char w_strCaption[ UGMB_MAX_TITLE_CHARS ]; // 标题
char w_strText[ UGMB_MAX_TEXT_CHARS ]; // 信息文本
int w_nStyle;
NANAWnd * w_pParentWnd;
int w_nWidth;
int w_nHeight;
int w_nStartX;
int w_nStartY;
int w_nButtonWidth1;
int w_nButtonWidth2;
NANAButton w_ButtonOK;
NANAButton w_ButtonCancel;
public:
NANAMessageBox();//:w_Timer1(this),w_Timer2(this),w_List(3)
virtual ~NANAMessageBox();
virtual int CreateWnd(
NANAWnd * pParentWnd,
const char* strCaption,
const char* strText,
int nStyle,
int nIcon);
protected:
virtual void OnCreate();
virtual void OnClose();
virtual void OnPaint();
virtual void OnKey(int nKeyCode,int bKeyDown);
virtual void OnTimer(NANATimer * pSrc);
virtual void OnDefault();
virtual void OnNotify(NANAWnd *pSrcWnd,int nMessageCode,int nParam1,int nParam2);
public:
void Show(NANAWnd * pParentWnd,const char* strCaption,const char* strText,int nStyle,int nIcon);
void Close();
};
#endif
#endif //__GUIPP_MESSAGE_BOX_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -