📄 myeditview.h
字号:
// MyEditView.h : interface of the CMyEditView class
//
/////////////////////////////////////////////////////////////////////////////
#include "MyEditDoc.h"
#if !defined(AFX_MYEDITVIEW_H__57126E0D_28BD_4F95_840F_266B063C8B07__INCLUDED_)
#define AFX_MYEDITVIEW_H__57126E0D_28BD_4F95_840F_266B063C8B07__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CMyEditView : public CView
{
protected: // create from serialization only
CMyEditView();
DECLARE_DYNCREATE(CMyEditView)
// Attributes
public:
int m_CharCount;
///////////////////////////////////////////////////////////////////////////////////////////////////////
CMyEditDoc* GetDocument();
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Operations
public:
void SetText(char *input,int len);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyEditView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
virtual void OnInitialUpdate();
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CMyEditView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
void ChangeLeft();
void ChangeTop();
BOOL m_bFirst;
UINT m_PageRows; //一页的行数
UINT m_PageCols;
UINT m_Rows; //总的行数
int m_TopLine; //最上面的行
int m_LeftChar; //最左面的列
void GetPageRowCols();
void SetHorzScrollBar();
void SetVertScrollBar();
UINT Point2Pos(CPoint point);
BOOL m_StartDrag;
BOOL m_bFocused;
int m_TextStart;
int m_HexStart;
int m_LineHeight; //行高
int m_CharWidth; //字符宽度
int m_SelStart, m_SelEnd; //被选中的字符串
char *m_text;
//{{AFX_MSG(CMyEditView)
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnSetFocus(CWnd* pOldWnd);
afx_msg void OnKillFocus(CWnd* pNewWnd);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
afx_msg void OnCharLeft();
afx_msg void OnCharRight();
afx_msg void OnLineUp();
afx_msg void OnLineDown();
};
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#ifndef _DEBUG // debug version in lwzView.cpp
inline CMyEditDoc* CMyEditView::GetDocument()
{ return (CMyEditDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MYEDITVIEW_H__57126E0D_28BD_4F95_840F_266B063C8B07__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -