www.pudn.com > TetrisWang.zip > CoolButton.h


#if !defined(AFX_COOLBUTTON_H__638771D2_159C_11D5_901C_5254AB1BB381__INCLUDED_) 
#define AFX_COOLBUTTON_H__638771D2_159C_11D5_901C_5254AB1BB381__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
 
 
/* 
 *	Rigel test ok 03/11/2001 
 *	Use:  
 *	map m_test to class CCoolButton 
 *	int function OnInitDialog() add: 
 *	m_test.SetIcon(); 
 *	or m_test.SetIcon(hIcon, cx, cy); 
 */ 
 
// CoolButton.h : header file 
// 
 
#define XS_FLAT_BUTTON 
 
///////////////////////////////////////////////////////////////////////////// 
// CCoolButton window 
 
class CCoolButton : public CButton 
{ 
// Construction 
public: 
	CCoolButton(); 
 
// Attributes 
public: 
 
// Operations 
public: 
 
// Overrides 
	// ClassWizard generated virtual function overrides 
	//{{AFX_VIRTUAL(CCoolButton) 
	public: 
	virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct); 
	//}}AFX_VIRTUAL 
 
// Implementation 
public: 
	BOOL SubclassDlgItem(UINT nID, CWnd *pParent); 
	void SetIcon(HICON hIcon = NULL, BYTE cx = 0, BYTE cy = 0, BOOL bOwnerDraw = TRUE); 
	virtual ~CCoolButton(); 
 
	// Generated message map functions 
protected: 
#ifdef XS_FLAT_BUTTON 
	//{{AFX_MSG(CCoolButton) 
	afx_msg void OnMouseMove(UINT nFlags, CPoint point); 
	afx_msg void OnKillFocus(CWnd* pNewWnd); 
	//}}AFX_MSG 
#endif 
 
	DECLARE_MESSAGE_MAP() 
private: 
 
#ifdef XS_FLAT_BUTTON 
	BOOL m_MouseOnButton; 
#endif 
 
	HICON m_hIcon; 
	BYTE m_cxIcon; 
	BYTE m_cyIcon; 
}; 
 
///////////////////////////////////////////////////////////////////////////// 
 
//{{AFX_INSERT_LOCATION}} 
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. 
 
#endif // !defined(AFX_COOLBUTTON_H__638771D2_159C_11D5_901C_5254AB1BB381__INCLUDED_)