-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathTranslucentLabel.h
40 lines (32 loc) · 1.17 KB
/
TranslucentLabel.h
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
/**
* ______________________________________________________
* This file is part of ko-ascension-launcher project.
*
* @author Mustafa Kemal Gılor <[email protected]> (2015)
* .
* SPDX-License-Identifier: MIT
* ______________________________________________________
*/
#pragma once
#include "TranslucentWnd.h"
class CTranslucentLabel:public CTranslucentWnd
{
DECLARE_DYNAMIC(CTranslucentLabel)
public:
CTranslucentLabel();
~CTranslucentLabel();
virtual void Render(Gdiplus::Graphics& g);
void SetFont(const WCHAR* familyName, float emSize, int style = Gdiplus::FontStyleRegular, Gdiplus::Unit unit = Gdiplus::UnitPixel);
void SetFormat(Gdiplus::StringAlignment align = Gdiplus::StringAlignmentCenter, Gdiplus::StringAlignment lineAlign = Gdiplus::StringAlignmentCenter);
void SetColor(const Gdiplus::Color& color);
Gdiplus::Font* GetFont() { return m_pFont; }
Gdiplus::StringFormat& GetFormat() { return m_format; }
Gdiplus::SolidBrush& GetBrush() { return m_brush; }
private:
DECLARE_MESSAGE_MAP()
//virtual void PreSubclassWindow();
//virtual void UpdateState();
Gdiplus::StringFormat m_format;
Gdiplus::Font* m_pFont;
Gdiplus::SolidBrush m_brush;
};