www.pudn.com > 智能内码识别,支持屏幕取词翻译的程序.zip > ACTIVEBU.H
// activebu.h : header file
//
//动作按钮类
#define MAX_FILE_NAME_LEN 100
/////////////////////////////////////////////////////////////////////////////
// CActiveButton window
class CActiveButton : public CBasicButton
{
// Construction
public:
CActiveButton();
// Attributes
private:
char m_sExeFileName[MAX_FILE_NAME_LEN+1] ;
HICON m_hIcon ;
int m_nLeftButtonStatus ; //左鼠标键状态
//0没有按下,1按下但没有移动,2按下
//并且已经移动
BOOL m_bButtonStatus ; //本按钮状态,0下,1上
CPoint m_OldDownPoint ; //鼠标左键按下时的位置
// Operations
public:
BOOL InitButton( LPCSTR lpcsName , //窗口名称
const RECT &rect , //窗口大小
CWnd *pParent , //父窗口
UINT uWinID , //窗口ID
LPCSTR lpcsExeFileName ) ; //执行文件名
void GetName( LPSTR lpsName ) ; //得到按钮名称
// Implementation
public:
virtual ~CActiveButton();
protected:
// Generated message map functions
//{{AFX_MSG(CActiveButton)
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnPaint();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////