view.h
来自「全屏显示的VC++源代码,简单实用。代码用VC++6.0编写。」· C头文件 代码 · 共 47 行
H
47 行
/////////////////////////////////////////////////////////////////////////////
// Project:MYIMGAPP
// Author:NorthTibet
// Date:星期四, 九月 26, 2002
// Description:通过定制的C++类在MFC框架中轻松显示多种格式的图象
//
/////////////////////////////////////////////////////////////////////////////
// View.h : interface of the CPictureView class
//
/////////////////////////////////////////////////////////////////////////////
#include "Doc.h"
/////////////////
// Picture view is a typical scroll view.
//
class CPictureView : public CScrollView {
public:
virtual ~CPictureView();
CPictureDoc* GetDocument() { return (CPictureDoc*)m_pDocument; }
protected:
BOOL m_rcImage; // rect to display image in
UINT m_iHowScale; // how to scale image
BOOL m_bMoving; // moving the window?
CPoint m_ptPrev; // previous point while moving
CPictureView();
void GetImageRect(CRect& rc);
void SetScrollSizes();
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual void OnInitialUpdate(); // called first time after construct
// command/message handlers
afx_msg void OnViewRotate();
afx_msg void OnViewScale(UINT nID);
afx_msg void OnUpdateViewScale(CCmdUI* pCmdUI);
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg UINT OnNcHitTest(CPoint point);
DECLARE_DYNCREATE(CPictureView)
DECLARE_MESSAGE_MAP()
};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?