123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- #pragma once
- #include "afxwin.h"
- #include <vector>
- using namespace std;
- class CButtonGroup;
- class CMyButton :
- public CButton
- {
- DECLARE_DYNAMIC(CMyButton);
- public:
- CMyButton();
- public:
- ~CMyButton();
- public:
- CButtonGroup* pParent;
- UINT index;
- CString name;
- UINT type;
- UINT btnState;
- UINT colorState;
- UINT lastColorState;
- UINT chooseState;
- CString strInfo;
- protected:
- afx_msg BOOL OnClicked();
- 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 void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
- afx_msg void OnPaint();
- LRESULT OnMouseLeave(WPARAM wParam, LPARAM lParam);
- public:
- void drawButton();
- void drawlines(CDC* pDC, CString str, CRect rc, UINT charNumOfLine, UINT linenum, UINT rowHeight);
- int getDividePos(CString str, int num);
- void changeColor(bool change);
- DECLARE_MESSAGE_MAP()
- };
|