www.pudn.com > 智能内码识别,支持屏幕取词翻译的程序.zip > BASICWIN.H


// basicwin.h : header file 
// 
 
#define	MAX_HINT_LEN	100			//hint最大长度 
#define	TIMER_ID			111 
#define	TIMER2_ID			333	 
#define	TIME_TO_WAIT_FOR_SHOW	300 
#define	TIME_TO_WAIT_FOR_HIDE		5000 
#define	TIME_TO_RECOVER			10 
 
///////////////////////////////////////////////////////////////////////////// 
// basicwin window 
 
class CBasicWin : public CWnd 
{ 
// Construction 
public: 
	CBasicWin(void) ; 
 
// Attributes 
private: 
	HWND	m_hActiveWnd ;	//保持原来的活动窗口句柄 
 
	//标记hint的状态,0没有显示过,1正在显示,2已经显示过 
	BOOL	m_bTimer ;	//标记是否挂上了时间器 
	int				m_nHintStatus ; 
	char		m_sHint[3][MAX_HINT_LEN] ;	//hint的内容 
	CPoint		m_HintPos ;	//hint的显示位置 
	 
	BOOL	m_bActiveMode ;	//1激活以前的窗口,0否,缺省为1 
 
// Operations 
public: 
	void	SetHint( LPCSTR lpcsHint0 , 
		LPCSTR lpcsHint1 , LPCSTR lpcsHint2 ) ;	//设置 hint 内容 
	void	SetActiveMode( BOOL b ) ;	//设置是否激活以前的窗口 
	void	ActiveOldWin( void ) ; 
// Implementation 
public: 
	virtual ~CBasicWin(); 
 
protected: 
	// Generated message map functions 
	//{{AFX_MSG(CBasicWin) 
	afx_msg int OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message); 
	afx_msg UINT OnNcHitTest(CPoint point); 
	afx_msg void OnMouseMove(UINT nFlags, CPoint point); 
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point); 
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point); 
	afx_msg void OnTimer(UINT nIDEvent); 
	//}}AFX_MSG 
	DECLARE_MESSAGE_MAP() 
}; 
 
/////////////////////////////////////////////////////////////////////////////