#pragma once #define PADDING_LEFT 0 #define PADDING_TOP 1 #define PADDING_RIGHT 2 #define PADDING_BOTTOM 3 #define TEXT_ALIGN_LEFT 0 #define TEXT_ALIGN_CENTER 1 #define TEXT_ALIGN_RIGHT 3 #define ID_MSG_RESIZEY WM_USER+123 class CGroupLabel : public CStatic { public: CGroupLabel(); ~CGroupLabel(); public: void SetBkgndColor(COLORREF color); void SetTextColor(COLORREF color); void SetLineColor(COLORREF color); void Setpadding(int type, unsigned int nPadding); void SetTextAlignMode(int nAlign); void EnableResize(); void DisableResize(); private: COLORREF m_crBkgnd; unsigned int m_nPadding[4]; COLORREF m_crLine; COLORREF m_crText; int m_nTextAlign; private: BOOL m_bEnableResize; DECLARE_MESSAGE_MAP() afx_msg void OnPaint(); public: afx_msg void OnLButtonDown(UINT nFlags, CPoint point); afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); };