📄 richeditpage.h
字号:
#if !defined(AFX_RICHEDITPAGE_H__D1A768F9_8E99_451F_8AEC_E7F8556031A9__INCLUDED_)
#define AFX_RICHEDITPAGE_H__D1A768F9_8E99_451F_8AEC_E7F8556031A9__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// RicheditPage.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CRicheditPage dialog
#include "..\EditStatic\CustomRichEditCtrl.h"
#include "..\EditStatic\NewToolBar.h "
class CRicheditPage : public CPropertyPage
{
DECLARE_DYNCREATE(CRicheditPage)
//Attributes
public:
// toolbar for our dialog box
CNewToolBar m_toolBar;
// @member variable added on Monday 8 octomber 2001
// @cmember
// how many lines for file new
LONG m_nLinesNew;
// for file open
LONG m_nLinesOpen;
BOOL m_bFisNou;
BOOL m_bFisOpen;
// this var means the dialog app appears and you begin to type
BOOL m_bBeginWriting;
CString m_strFilename;
CPoint point;
// I have clicked in the window
BOOL m_bClick;
// I have pressed the TAB key
BOOL m_bTab;
// you begin to type and you save for the first time your file
// when you save the 2nd,the3rd,etc dialog box with CFileDialog
// won't appear. You save the file and the app keep in mind you
// saved your file with the m_strFilename name and save file with
// this name
int m_nBeginWriting;
// the same thing
int m_nFileNew;
// @mvar added on Monday 22 octomber 2001
UINT m_nIDTracking;
UINT m_nIDLastMessage;
// @member variable added on Thursday 18 Apr 2002
// @cmember
// index for toolbar buttons
int m_index;
// Construction
public:
CRicheditPage();
// @cmember
// My callback procedure that reads the rich edit control content
// and put it into a file
// function added on 20 september 2001 from VC help(MSDN)
static DWORD CALLBACK MyStreamOutCallback(DWORD dwCookie,
LPBYTE pbBuff, LONG cb, LONG *pcb);
void Print(BOOL bShowPrintDialog);
~CRicheditPage();
// Dialog Data
//{{AFX_DATA(CRicheditPage)
enum { IDD = IDD_RICHEDIT_PAGE };
CCustomRichEditCtrl m_rtf;
//}}AFX_DATA
// Overrides
// ClassWizard generate virtual function overrides
//{{AFX_VIRTUAL(CRicheditPage)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CRicheditPage)
virtual BOOL OnInitDialog();
afx_msg void OnFileNew();
afx_msg void OnFileOpen();
afx_msg void OnFileSave();
afx_msg void OnFileSaveAs();
afx_msg void OnFilePrint();
afx_msg void OnBold();
afx_msg void OnItalic();
afx_msg void OnUnderline();
afx_msg void OnEditUndo();
afx_msg void OnEditCut();
afx_msg void OnEditCopy();
afx_msg void OnEditPaste();
afx_msg void OnColour();
afx_msg void OnClose();
afx_msg void OnParagraphLeft();
afx_msg void OnParagraphCenter();
afx_msg void OnParagraphRight();
afx_msg void OnParagraphBulleted();
afx_msg void OnFormatFont();
afx_msg void OnEditSelectAll();
afx_msg void OnEditDelete();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnUpdateEditCut(CCmdUI* pCmdUI);
afx_msg void OnUpdateEditCopy(CCmdUI* pCmdUI);
afx_msg void OnUpdateBold(CCmdUI* pCmdUI);
afx_msg void OnUpdateItalic(CCmdUI* pCmdUI);
afx_msg void OnUpdateUnderline(CCmdUI* pCmdUI);
afx_msg void OnUpdateEditPaste(CCmdUI* pCmdUI);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnUpdateEditDelete(CCmdUI* pCmdUI);
afx_msg void OnUpdateEditUndo(CCmdUI* pCmdUI);
afx_msg void OnUpdateParagraphBulleted(CCmdUI* pCmdUI);
afx_msg void OnUpdateParagraphCenter(CCmdUI* pCmdUI);
afx_msg void OnUpdateParagraphLeft(CCmdUI* pCmdUI);
afx_msg void OnUpdateParagraphRight(CCmdUI* pCmdUI);
//}}AFX_MSG
afx_msg BOOL OnToolTipText(UINT nID, NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnEnterIdle(UINT nWhy, CWnd* pWho);
// added on 6 Aug 2003 for updating dialog box controls
afx_msg LRESULT OnKickIdle(WPARAM wParam, LPARAM);
afx_msg LRESULT OnIdleUpdateCmdUI(WPARAM wParam, LPARAM);
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_RICHEDITPAGE_H__D1A768F9_8E99_451F_8AEC_E7F8556031A9__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -