gps/GPSProject/GPSMain/BmpTxtButton.h

82 lines
2.2 KiB
C
Raw Permalink Normal View History

2019-05-01 12:32:35 +00:00
#if !defined(AFX_BMPTXTBUTTON_H__10973F7C_8C2C_4866_BA86_28D467F6F838__INCLUDED_)
#define AFX_BMPTXTBUTTON_H__10973F7C_8C2C_4866_BA86_28D467F6F838__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// BmpTxtButton.h : header file
//
// <20><><EFBFBD>尴ť״̬
#define TBS_NORMAL 0 // <20><>ͨ
#define TBS_DOWN 1 // <20><><EFBFBD><EFBFBD>
#define TBS_FOUCSED 2 // <20><><EFBFBD>н<EFBFBD><D0BD><EFBFBD>
#define TBS_DISABLE 3 // <20><><EFBFBD><EFBFBD>
/////////////////////////////////////////////////////////////////////////////
// CBmpTxtButton window
class CBmpTxtButton : public CButton
{
private:
CString m_Title; // <20><>ť<EFBFBD><C5A5><EFBFBD><EFBFBD>
int m_State; // <20><>ť״̬
COLORREF m_TitleColor; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
UINT m_NormalID; // <20><>ť<EFBFBD><C5A5><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD>ԴID<49><44> <20><><EFBFBD><EFBFBD>״̬
UINT m_DownID; // <20><>ť<EFBFBD><C5A5><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD>ԴID<49><44> <20><><EFBFBD><EFBFBD>
UINT m_FoucsedID; // <20><>ť<EFBFBD><C5A5><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD>ԴID<49><44> <20><><EFBFBD>н<EFBFBD><D0BD><EFBFBD>
UINT m_DisableID; // <20><>ť<EFBFBD><C5A5><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD>ԴID<49><44> <20><><EFBFBD><EFBFBD>
CDC m_NormalDC;
CDC m_DownDC;
CFont m_txtFont;
bool m_butDown;
int m_butStyle;
// Construction
public:
CBmpTxtButton();
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CBmpTxtButton)
public:
virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
protected:
virtual void PreSubclassWindow();
//}}AFX_VIRTUAL
// Implementation
public:
void SetTitleStyle(int iStyle);
void SetButtonDown(bool bDown);
bool IsButtonDown(void);
CString GetButtonTitle(void);
int GetButtonState(void);
void SetButtonState(int iState);
void SetButtonTitle(CString iTitle);
void LoadBitmaps(UINT nIDBitmapResource,UINT nIDBitmapResourceSel = 0,UINT nIDBitmapResourceFocus = 0,UINT nIDBitmapResourceDisabled = 0 );
virtual ~CBmpTxtButton();
// Generated message map functions
protected:
//{{AFX_MSG(CBmpTxtButton)
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnPaint();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_BMPTXTBUTTON_H__10973F7C_8C2C_4866_BA86_28D467F6F838__INCLUDED_)