📄 showjpgview.h
字号:
// showjpgView.h : CshowjpgView 类的接口
//
#pragma once
#include "Input.h" // 将输入头文件加入
#include "ShowPic.h" // 加入显示头文件
//class CshowjpgView : public CView
class CshowjpgView : public CScrollView
{
protected: // 仅从序列化创建
CshowjpgView();
DECLARE_DYNCREATE(CshowjpgView)
// 属性
public:
CshowjpgDoc* GetDocument() const;
// 操作
public:
// 重写
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 ~CshowjpgView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// 生成的消息映射函数
protected:
DECLARE_MESSAGE_MAP()
public:
// 显示jpg文件
void showjpg(CDC * pDC,CString strPicPath);
// 测试
void Draw(CDC * pDC,CPoint Start,CPoint End);
public:
virtual void OnInitialUpdate();
public:
afx_msg void OnPint2dtra();
public:
afx_msg void OnFileOpen();
CInput input; // 声明输入类对象。
int iWidth; // 图像的宽度。
int iHeight; // 图像的高度。
CShowPic showPic; // 声明显示类变量。
BOOL bPint; // 标记是否进行绘图
BOOL bMdown; // 标记鼠标是否按下
CPoint pStart ,pEnd;
BOOL bFirst; // 标示是否时第一次鼠标按下
HCURSOR m_hMouseCursor ;
public:
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
public:
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
public:
afx_msg void On2dpinttra();
public:
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
public:
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
public:
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
public:
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
public:
afx_msg void OnPaint();
void DrawText(CDC * pDC);
};
#ifndef _DEBUG // showjpgView.cpp 中的调试版本
inline CshowjpgDoc* CshowjpgView::GetDocument() const
{ return reinterpret_cast<CshowjpgDoc*>(m_pDocument); }
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -