chenluhua1980
2026-01-23 08fc60deca0fa2a0658a676d9dd76e0e69436312
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#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);
};