forked from sabrogden/Ditto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRichEditCtrlEx.h
112 lines (88 loc) · 2.82 KB
/
RichEditCtrlEx.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
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#if !defined(AFX_AUTORICHEDITCTRL_H__C26D1E0E_DD32_11D2_B39F_000092914562__INCLUDED_)
#define AFX_AUTORICHEDITCTRL_H__C26D1E0E_DD32_11D2_B39F_000092914562__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// AutoRichEditCtrl.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CRichEditCtrlEx window
BOOL PASCAL AfxInitRichEditEx();
class _AFX_RICHEDITEX_STATE
{
public:
_AFX_RICHEDITEX_STATE()
{
m_hInstRichEdit20 = NULL;
}
virtual ~_AFX_RICHEDITEX_STATE()
{
if(m_hInstRichEdit20 != NULL)
{
::FreeLibrary(m_hInstRichEdit20);
}
}
HINSTANCE m_hInstRichEdit20;
};
class CRichEditCtrlEx : public CRichEditCtrl
{
// Construction
public:
CRichEditCtrlEx();
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CRichEditCtrlEx)
public:
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
//}}AFX_VIRTUAL
// Implementation
public:
long GetSelectionFontSize();
CString GetSelectionFontName();
CStringArray m_saFontList;
void GetSystemFonts(CStringArray &saFontList);
void SetFontSize(int nPointSize);
void SetFontName(CString sFontName);
void SelectColor();
bool ParagraphIsBulleted();
void SetParagraphBulleted();
PARAFORMAT GetParagraphFormat();
bool ParagraphIsRight();
bool ParagraphIsLeft();
bool ParagraphIsCentered();
void SetParagraphRight();
void SetParagraphLeft();
void SetParagraphCenter();
CHARFORMAT GetCharFormat(DWORD dwMask = CFM_COLOR | CFM_FACE | CFM_SIZE | CFM_BOLD | CFM_ITALIC | CFM_UNDERLINE);
bool SelectionIsBold();
bool SelectionIsItalic();
bool SelectionIsUnderlined();
void SetSelectionBold();
void SetSelectionItalic();
void SetSelectionUnderlined();
void SetRTF(CStringA sRTF);
void SetRTF(const char *pRTF);
CString GetRTF();
void SetText(CString sText);
CString GetText();
virtual ~CRichEditCtrlEx();
// Generated message map functions
protected:
//{{AFX_MSG(CRichEditCtrlEx)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
void SetCharStyle(int MASK, int STYLE, int nStart, int nEnd);
static DWORD CALLBACK CBStreamIn(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb);
static DWORD CALLBACK CBStreamOut(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG* pcb);
static BOOL CALLBACK CBEnumFonts(LPLOGFONT lplf, LPTEXTMETRIC lptm, DWORD dwType, LPARAM lpData);
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_AUTORICHEDITCTRL_H__C26D1E0E_DD32_11D2_B39F_000092914562__INCLUDED_)