//头文件
#if !defined(AFX_MENUBUTTON_H__B0745FB2_A382_4B46_8C67_B5369E51CB91__INCLUDED_)
#define AFX_MENUBUTTON_H__B0745FB2_A382_4B46_8C67_B5369E51CB91__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// MenuButton.h : header file
//
/
// CMenuButton window
class CMenuButton : public CButton
{
// Construction
public:
CMenuButton();
// Attributes
public:
CRect m_ButRect;
CRect m_LRect;
CRect m_RRect;
int m_State;
BOOL b_InFlag;
BOOL b_ClickFlag;
BOOL b_ClickBut;
CMenu m_Menu;
COLORREF m_BackColor;
COLORREF m_ForeColor;
CString m_strText;
int m_MenuID;
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{
{AFX_VIRTUAL(CMenuButton)
public:
virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
protected:
virtual void PreSubclassWindow();
//}}AFX_VIRTUAL
// Implementation
public:
BOOL isClick();
void SetBkColor(COLORREF color);
void SetForeColor(COLORREF color);
void SetText(CString str);
void SetMenuID(int nID);
void DrawButton(CDC *pDC);
virtual ~CMenuButton();
// Generated message map functions
protected:
//{
{AFX_MSG(CMenuButton)
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/
//{
{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before