moveview.h
来自「Visual_C++.NET实用编程百例」· C头文件 代码 · 共 61 行
H
61 行
// MoveView.h : CMoveView 类的接口
//
#pragma once
class CMoveView : public CView
{
protected: // 仅从序列化创建
CMoveView();
DECLARE_DYNCREATE(CMoveView)
// 属性
public:
CMoveDoc* GetDocument() const;
// 操作
public:
//显示字符串
CString m_strText;
//字符串的起始位置
float m_StartX;
CRect m_Rect;
// 重写
public:
virtual void OnDraw(CDC* pDC); // 重写以绘制该视图
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
// 实现
public:
virtual ~CMoveView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// 生成的消息映射函数
protected:
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnTimer(UINT nIDEvent);
virtual void OnInitialUpdate();
};
#ifndef _DEBUG // MoveView.cpp 的调试版本
inline CMoveDoc* CMoveView::GetDocument() const
{ return reinterpret_cast<CMoveDoc*>(m_pDocument); }
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?