📄 indicator.h
字号:
#if !defined(AFX_INDICATOR_H__1155737E_628E_11D2_81B5_0020AFC24C58__INCLUDED_)
#define AFX_INDICATOR_H__1155737E_628E_11D2_81B5_0020AFC24C58__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// Indicator.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CHoverButton window
enum INDICATOR_STATE{ INDICATOR_ON, INDICATOR_OFF, INDICATOR_GREYED};
class CIndicator : public CBitmapButton
{
// Construction
public:
// Constructor: default is to use buttons defined in our resources
CIndicator();
// Attributes
public:
// The only way of accessing data from outside this class is to call these 2 functions
INDICATOR_STATE GetIndicatorState(void) { return(m_IndicatorState);};
INDICATOR_STATE SetIndicatorState(INDICATOR_STATE nState);
public:
BOOL m_bMouseTracking;
INDICATOR_STATE m_IndicatorState;
CBitmap m_bmpIndicatorOn;
CBitmap m_bmpIndicatorOff;
CBitmap m_bmpIndicatorGrey;
HWND m_hWndOld;
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CIndicator)
public:
virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
//}}AFX_VIRTUAL
private:
// Called by OnMouseMove() when entering/leaving the button
// void OnMouseLeave(void);
// void OnMouseEnter(void);
// Implementation
public:
virtual ~CIndicator();
BOOL LoadBitmaps(UINT nBitmapOn, UINT nBitmapOff, UINT nBitmapGrey);
BOOL LoadBitmaps(LPCSTR lpszBitmapOn, LPCSTR lpszBitmapOff, LPCSTR lpszBitmapGrey);
// Generated message map functions
protected:
//{{AFX_MSG(CIndicator)
// afx_msg void OnMouseMove(UINT nFlags, CPoint point);
// afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_INDICATOR_H__1155737E_628E_11D2_81B5_0020AFC24C58__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -