SDC C-Project CF Review 프로그램
LYW
2021-08-10 8ac7359b04409c2a1426f9a179c00b1c966d0146
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#pragma once
 
#include "afxcmn.h"
 
 
struct _GroupDrawOption
{
    _GroupDrawOption()
    {
        nDrawStyle=0;
 
        //clrTitle = RGB(175,210,255);
        clrTitle = RGB(83,156,255);
        clrBack = RGB(227, 239, 255);
        clrOutline = RGB(104, 147, 207);
 
        clrFontNormal = RGB(0,0,0);
        clrFontPush = RGB(0,0,0);
        clrFontMouseOver = RGB(128, 128, 128);
        clrFontDisable = RGB(150,150,150);
        clrTransparency = 0xFFFFFE;
 
 
        bTextEnable = TRUE;
        nTextPosX = 20;
        nTextPosY = 6;
        strFontName = "";
        nFontSize = 30;
 
        bTextShadow = FALSE;
        nTextShadowX = nTextShadowY=1;
 
        nTitleHeight = 30;
    }
    int nDrawStyle;//0:
 
    COLORREF clrTitle;
    COLORREF clrBack;
    COLORREF clrOutline;
    COLORREF clrTransparency;
 
    int nTitleHeight;
    //±ÛÀÚÃâ·Â°ü·Ã ÅÂÇö[2016/9/19]
    bool bTextEnable;
    CString strFontName;
    int nFontSize;
    int nTextPosX, nTextPosY; //Á»ó´Ü±âÁØ ±âÁØÀ¸·Î ±ÛÀÚÇ¥½Ã OFFSET
 
    COLORREF clrFontNormal;
    COLORREF clrFontPush;
    COLORREF clrFontMouseOver;
    COLORREF clrFontDisable;
 
    //ÆùÆ® ±×¸²ÀÚ Ãâ·Â ÅÂÇö[2016/9/19]
    bool bTextShadow;
    int nTextShadowX, nTextShadowY;
 
    COLORREF clrReserved[16];//±×¸®´Â ½ºÅ¸ÀÏ¿¡ µû¶ó¼­ ¾Ë¾Æ¼­!!
};
 
 
class CakGroupDraw : public CStatic
{
public:
    CakGroupDraw(void);
    ~CakGroupDraw(void);
    //virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
 
public:
    void clear();
 
    void setGroupDrawOption(_GroupDrawOption Option);
    _GroupDrawOption getGroupDrawOption(){ return m_Option;};
 
    void setFont( char* fontName, int fontSize );
protected:
    void drawGroup(CDC* pDC, CRect rect, _GroupDrawOption option);
    void drawText(CDC* pDC, CRect rect, _GroupDrawOption option);
 
    COLORREF getBrightColor(COLORREF color, double dBright);
    void fillRectGradientT2B(CDC* pDC, CRect rect, COLORREF colorTop, COLORREF colorBottom);
protected:
    _GroupDrawOption m_Option;
    CFont m_fontTitle;
 
public:
    DECLARE_MESSAGE_MAP()
    afx_msg BOOL OnEraseBkgnd(CDC* pDC);
    virtual void DrawItem(LPDRAWITEMSTRUCT /*lpDrawItemStruct*/);
    afx_msg void OnPaint();
    virtual BOOL Create(LPCTSTR lpszText, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID = 0xffff);
    virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
    virtual void PreSubclassWindow();
 
public:
    afx_msg void OnSize(UINT nType, int cx, int cy);
};