bmpbtn.h
来自「WINCE下的多功能位图按钮实现 可作为单选按钮」· C头文件 代码 · 共 48 行
H
48 行
/////////////////////////////////////////////////////////////////////
/////////////////////// BmpBtn.h ///////////////////////////////////
////////////////////////////////////////////////////////////////////
#ifndef _BMPBTN_
#define _BMPBTN_
#define BTN_UP_ENABLE 0
#define BTN_DOWN_ENABLE 1
#define BTN_UP_DISABLE 2
#define BTN_DOWN_DISABLE 3
#define BTN_BMP_NUM 4
#define PART_OK 0
#define PART_ALARM 1
// used ai nCtlKind of loadBmpRes( int nCtlKind, ...)
#define CTRL_CHECK 4 // Check Box Style
#define CTRL_BTN 3 // Button Style
#define CTRL_BMP 2 // Bitmap Control Style
class BmpBtn : public CStatic {
public:
BmpBtn();
~BmpBtn();
//{{AFX_VIRTUAL(CBitmapButtonTestDlg)
protected:
virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
//}}AFX_VIRTUAL
public:
void theProc( UINT message, WPARAM wParam, LPARAM lParam);
BOOL loadBmpRes( int nCtlKind, unsigned int nID_UE=0, unsigned int nID_DE=0, unsigned int nID_UD=0, unsigned int nID_DD=0 );
BOOL setStatus( unsigned int nStatusFlg=0 );
unsigned int getStatus();
BOOL deleteBmpList();
BOOL enableWindow( BOOL bEnable );
protected:
unsigned int onCheck();
protected:
HBITMAP hbmp[4];
unsigned int nCtrlKind; // =4 CTRL_CHECK, =3 CTRL_BTN, =2 CTRL_BMP
unsigned int nStatus;
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?