⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readervcview.h

📁 Foxit Reader DLL开发的示例软件。可以很方便地实现自己的pdf viewer.
💻 H
字号:
// ReaderVCView.h : interface of the CReaderVCView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_READERVCVIEW_H__9AFC449C_26D0_4906_ABAE_1298871862E2__INCLUDED_)
#define AFX_READERVCVIEW_H__9AFC449C_26D0_4906_ABAE_1298871862E2__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "afxtempl.h"
class CReaderVCDoc;
class CReaderVCView : public CView
{
protected: // create from serialization only
	CReaderVCView();
	DECLARE_DYNCREATE(CReaderVCView)

// Attributes
public:
	CReaderVCDoc* GetDocument();
	CChildFrame *m_pFram;
// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CReaderVCView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	virtual void OnInitialUpdate();
	protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	void SyncScroll();
	void LoadMyCursor(int nflag = 0);
	void ScalPage(double dbScal);
	void GotoPage(int index);
	BOOL SetPDFDocument(FPDF_DOCUMENT pDoc, int nPageNum);
	void DrawPage(int nRotate, CDC *pDC);
	void SetPageMetrics(FPDF_PAGE pPage);

	void SetScalFactor(double dbScal);
	void GetNewPageSize(int &nsizeX, int &nsizeY);
	BOOL LoadPDFPage(FPDF_DOCUMENT doc, int nIndex);

	FPDF_DOCUMENT GetPDFDoc(){ return m_pDoc;}
	int GetTotalPages(){ return m_nTotalPage;}
	virtual ~CReaderVCView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif


private:
	//for render pdf
	FPDF_DOCUMENT m_pDoc;
	FPDF_PAGE m_pPage;
	int m_nTotalPage;
	int m_nRotateFlag;
	double m_dbScaleFactor;
	int m_nPageIndex;
	double m_dbPageWidth;
	double m_dbPageHeight;
	int m_nStartX;
	int m_nStartY;
	int m_nActualSizeX;
	int m_nActualSizeY;


	
	BOOL m_bHand;
	BOOL m_bSnap;
	CRect m_rtOld;
	CPoint m_ptLBDown;

	int m_nPosH;
	int m_nPosV;

	BOOL m_bBookmark;
// Generated message map functions
protected:
	//{{AFX_MSG(CReaderVCView)
	afx_msg void OnDocFirstpage();
	afx_msg void OnDocGotopage();
	afx_msg void OnDocLastpage();
	afx_msg void OnDocNextpage();
	afx_msg void OnDocPrepage();
	afx_msg void OnClockwise();
	afx_msg void OnCounterclockwise();
	afx_msg void OnViewActualSize();
	afx_msg void OnViewFitPage();
	afx_msg void OnViewFitWidth();
	afx_msg void OnViewZoomIn();
	afx_msg void OnViewZoomOut();
	afx_msg void OnViewZoomTo();
	afx_msg void OnFilePrint();
	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 OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnToolSnapshot();
	afx_msg void OnToolHand();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg void OnDestroy();
	afx_msg void OnUpdateDocFirstpage(CCmdUI* pCmdUI);
	afx_msg void OnUpdateDocLastpage(CCmdUI* pCmdUI);
	afx_msg void OnUpdateDocNextpage(CCmdUI* pCmdUI);
	afx_msg void OnUpdateDocPrepage(CCmdUI* pCmdUI);
	afx_msg void OnUpdateToolHand(CCmdUI* pCmdUI);
	afx_msg void OnUpdateToolSnapshot(CCmdUI* pCmdUI);
	afx_msg void OnViewBookmark();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in ReaderVCView.cpp
inline CReaderVCDoc* CReaderVCView::GetDocument()
   { return (CReaderVCDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_READERVCVIEW_H__9AFC449C_26D0_4906_ABAE_1298871862E2__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -