⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 agentbutton.h

📁 vc编写的精灵显示源码
💻 H
字号:
#if !defined(AFX_AGENTBUTTON_H__81F452ED_CE5A_408A_B51D_D695A43F41FF__INCLUDED_)
#define AFX_AGENTBUTTON_H__81F452ED_CE5A_408A_B51D_D695A43F41FF__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// AgentButton.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CAgentButton window

class CAgentButton : public CButton
{
// Construction
public:
	CAgentButton();

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CAgentButton)
	public:
	virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
	protected:
	virtual void PreSubclassWindow();
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CAgentButton();

	// Generated message map functions
protected:
	void SendNotify( WPARAM wParam, LPARAM lParam );
	//{{AFX_MSG(CAgentButton)
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnKillFocus(CWnd* pNewWnd);
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	//}}AFX_MSG
	afx_msg LRESULT OnMouseLeave( WPARAM wParam, LPARAM lParam );
	afx_msg LRESULT OnBMSetCheck(WPARAM, LPARAM);
	afx_msg LRESULT OnBMGetCheck(WPARAM, LPARAM);
	afx_msg LRESULT OnUnCheck(WPARAM, LPARAM);
	afx_msg void OnClicked();
	DECLARE_MESSAGE_MAP()
public:
	void AutoSize();
	long m_lMargin, m_lTextMargin;
	void Init( UINT nIDResource, int nImages, BOOL bAutoSize = FALSE );
	COLORREF m_crBackground, m_crText;
private:
	void DrawState ( CDC* pDC, long x, long y, int nState );
	BOOL m_bMouseDown;
	BOOL m_bTracking;
	BOOL m_bChecked;
	int m_nImages;

	DWORD m_dwStyle;
	CBitmap m_cBitmap;
	CDC m_dcBitmap;
	BITMAP m_bitmapInfo;
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_AGENTBUTTON_H__81F452ED_CE5A_408A_B51D_D695A43F41FF__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -