42 lines
809 B
C++
Executable File
42 lines
809 B
C++
Executable File
#pragma once
|
|
|
|
// °´Å¥Ñùʽ
|
|
#define BTS_DISABLE 0
|
|
#define BTS_NORMAL 1
|
|
#define BTS_DOWN 2
|
|
#define BT_NORMAL 1
|
|
#define BT_DOWN 2
|
|
#define BT_DISABLE 4
|
|
// CBmpButton
|
|
|
|
class CBmpButton : public CButton
|
|
{
|
|
DECLARE_DYNAMIC(CBmpButton)
|
|
private:
|
|
CDC m_NormalDC;
|
|
CDC m_DownDC;
|
|
CDC m_DisableDC;
|
|
|
|
int m_InitDC;
|
|
int m_Status;
|
|
int m_ButType;
|
|
|
|
public:
|
|
CBmpButton();
|
|
virtual ~CBmpButton();
|
|
void LoadBitmaps(UINT nIDBitmapResource,UINT nIDBitmapResourceSel = 0,UINT nIDBitmapResourceDisabled = 0 );
|
|
void SetButType(int nType);
|
|
protected:
|
|
DECLARE_MESSAGE_MAP()
|
|
public:
|
|
virtual void DrawItem(LPDRAWITEMSTRUCT /*lpDrawItemStruct*/);
|
|
public:
|
|
afx_msg void OnPaint();
|
|
public:
|
|
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
|
|
protected:
|
|
virtual void PreSubclassWindow();
|
|
};
|
|
|
|
|