-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAutoRichEditCtrl.h
executable file
·98 lines (76 loc) · 2.68 KB
/
AutoRichEditCtrl.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
#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
class _AFX_RICHEDITEX_STATE
{
public:
_AFX_RICHEDITEX_STATE();
virtual ~_AFX_RICHEDITEX_STATE();
HINSTANCE m_hInstRichEdit20 ;
};
BOOL PASCAL AfxInitRichEditEx();
#define AEN_ESCAPE 0x0700
// AutoRichEditCtrl.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CAutoRichEditCtrl window
class CAutoRichEditCtrl : public CRichEditCtrl
{
// Construction
public:
CAutoRichEditCtrl();
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAutoRichEditCtrl)
virtual BOOL Create (DWORD dwStyle, const RECT& rcRect, CWnd* pParentWnd, UINT nID);
//}}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(CString sRTF);
CString GetRTF();
virtual ~CAutoRichEditCtrl();
// Generated message map functions
protected:
//{{AFX_MSG(CAutoRichEditCtrl)
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
void SetCharStyle(int MASK, int STYLE, int nStart, int nEnd);
static DWORD CALLBACK CBStreamIn(DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb);
static DWORD CALLBACK CBStreamOut(DWORD 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_)