-rw-r--r-- | FontsPage.h | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/FontsPage.h b/FontsPage.h new file mode 100644 index 0000000..96c2b97 --- a/dev/null +++ b/FontsPage.h | |||
@@ -0,0 +1,87 @@ | |||
1 | // FontsPage.h : header file | ||
2 | // | ||
3 | |||
4 | #include "ColorButton.h" | ||
5 | |||
6 | ///////////////////////////////////////////////////////////////////////////// | ||
7 | // CFontsPage dialog | ||
8 | |||
9 | struct CFontFormat{ | ||
10 | CHARFORMATm_fmtChar; | ||
11 | COLORREFm_bgColor; | ||
12 | enum _flags{ | ||
13 | flagBGColor = 1 | ||
14 | }; | ||
15 | int m_Flags; | ||
16 | CString m_Tip; | ||
17 | }; | ||
18 | |||
19 | class CFontsPage : public CPropertyPage | ||
20 | { | ||
21 | DECLARE_DYNCREATE(CFontsPage) | ||
22 | |||
23 | // Construction | ||
24 | public: | ||
25 | CHARFORMAT m_fmtDefChar; | ||
26 | CFontFormat* m_fmtLast; | ||
27 | void AddFmt(UINT name,CFontFormat* cf,UINT flags=CFontFormat::flagBGColor); | ||
28 | void FillInFormats(); | ||
29 | CFontFormat m_fmtT42System; | ||
30 | CFontFormat m_fmtT42Remote; | ||
31 | CFontFormat m_fmtT42Local; | ||
32 | static int CALLBACK FillInCharsets(const ENUMLOGFONTEX* lpelfe,const TEXTMETRIC* lpntme,const int FontType,const LPARAM lParam); | ||
33 | void FillCharsets(); | ||
34 | void UpdateSample(); | ||
35 | void UpdateFormat(BOOL bSave=FALSE); | ||
36 | CHARFORMAT m_fmtChar; | ||
37 | static int CALLBACK FillInFaces(const ENUMLOGFONTEX* lpelfe,const TEXTMETRIC* lpntme,const int FontType,const LPARAM lParam); | ||
38 | CFontsPage(); | ||
39 | ~CFontsPage(); | ||
40 | |||
41 | // Dialog Data | ||
42 | //{{AFX_DATA(CFontsPage) | ||
43 | enum { IDD = IDD_OPTIONS_FONTS }; | ||
44 | CStaticm_TipCtl; | ||
45 | CColorButtonm_fgColorCtl; | ||
46 | CColorButtonm_bgColorCtl; | ||
47 | CComboBoxm_CharsetCtl; | ||
48 | CButtonm_UnderlineCtl; | ||
49 | CButtonm_StrikeoutCtl; | ||
50 | CButtonm_ItalicCtl; | ||
51 | CButtonm_BoldCtl; | ||
52 | CComboBoxm_SizeCtl; | ||
53 | CListBoxm_FormatsCtl; | ||
54 | CComboBoxm_FacesCtl; | ||
55 | CRichEditCtrl m_SampleCtl; | ||
56 | //}}AFX_DATA | ||
57 | |||
58 | |||
59 | // Overrides | ||
60 | // ClassWizard generate virtual function overrides | ||
61 | //{{AFX_VIRTUAL(CFontsPage) | ||
62 | public: | ||
63 | virtual void OnOK(); | ||
64 | protected: | ||
65 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support | ||
66 | //}}AFX_VIRTUAL | ||
67 | |||
68 | // Implementation | ||
69 | protected: | ||
70 | // Generated message map functions | ||
71 | //{{AFX_MSG(CFontsPage) | ||
72 | virtual BOOL OnInitDialog(); | ||
73 | afx_msg void OnSelendokFaces(); | ||
74 | afx_msg void OnBold(); | ||
75 | afx_msg void OnSelendokFontsize(); | ||
76 | afx_msg void OnEditchangeFontsize(); | ||
77 | afx_msg void OnItalic(); | ||
78 | afx_msg void OnStrikeout(); | ||
79 | afx_msg void OnUnderline(); | ||
80 | afx_msg void OnSelendokCharset(); | ||
81 | afx_msg void OnBackcolor(); | ||
82 | afx_msg void OnForecolor(); | ||
83 | afx_msg void OnSelchangeFormatname(); | ||
84 | //}}AFX_MSG | ||
85 | DECLARE_MESSAGE_MAP() | ||
86 | |||
87 | }; | ||