showcontentdlg.h
来自「深入浅出Visual C++入门进阶与应用实例 随书光盘 作者 何志丹」· C头文件 代码 · 共 67 行
H
67 行
#if !defined(AFX_SHOWCONTENTDLG_H__A0CB6C9B_9FF6_4A2C_9A4F_D03322C30768__INCLUDED_)
#define AFX_SHOWCONTENTDLG_H__A0CB6C9B_9FF6_4A2C_9A4F_D03322C30768__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ShowContentDlg.h : header file
//
#include "Resource.h"
#include "..\include\BaseDataLib.h"
/////////////////////////////////////////////////////////////////////////////
// CShowContentDlg dialog
//使用richctrl显示大段内容(可以有链接)
class DLL_UILIB_EXT_CLASS CShowContentDlg : public CDialog
{
// Construction
public:
bool GoCurPage();//根据combox的选择,显示当前页的内容
void ShowContent();//根据设置,生成内容,并显示第一页内容
CShowContentDlg(CWnd* pParent = NULL); // standard constructor
bool m_bKeepVisible ; //非激活状态,是否可见,不可见就最小化
CArticleElements m_ArtEles ;//对应文章的所有文章元素的集合
// Dialog Data
//{{AFX_DATA(CShowContentDlg)
enum { IDD = IDD_SHOW_CONTENT };
CComboBox m_editCombox;
CRichEditCtrl m_editContent;//显示内容的RichCtrl
UINT m_nCharCountAPage;
UINT m_nEleMaxCharCount;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CShowContentDlg)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
CStringArray m_arTexts;
// Generated message map functions
//{{AFX_MSG(CShowContentDlg)
afx_msg void OnSize(UINT nType, int cx, int cy);//当对话框大小变化时,m_editContent改变大小
afx_msg void OnCopyAll();
afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
virtual BOOL OnInitDialog();
afx_msg void OnKillfocusCharcountPage();
afx_msg void OnKillfocusEleMaxCharcount();
afx_msg void OnSelchangePageNum();
//}}AFX_MSG
private:
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_SHOWCONTENTDLG_H__A0CB6C9B_9FF6_4A2C_9A4F_D03322C30768__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?