?? showjpgview.h
字號:
// showjpgView.h : CshowjpgView 類的接口
//
#pragma once
#include "Input.h" // 將輸入頭文件加入
#include "ShowPic.h" // 加入顯示頭文件
//class CshowjpgView : public CView
class CshowjpgView : public CScrollView
{
protected: // 僅從序列化創(chuàng)建
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);
// 實現(xiàn)
public:
virtual ~CshowjpgView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// 生成的消息映射函數(shù)
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 中的調(diào)試版本
inline CshowjpgDoc* CshowjpgView::GetDocument() const
{ return reinterpret_cast<CshowjpgDoc*>(m_pDocument); }
#endif
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -