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

📄 previewtoolview.h

📁 MFC程序开发参考大全 【明日科技】宋坤 刘锐宁 李伟明 【丛 书 名】 软件工程师典藏 【出 版 社】 人民邮电出版社 本书详细介绍了MFC框架中所有常用类及控件的应用
💻 H
字号:
// PreviewToolView.h : interface of the CPreviewToolView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_PREVIEWTOOLVIEW_H__CC87D2D1_6328_43D6_AE05_DF6F835FECF3__INCLUDED_)
#define AFX_PREVIEWTOOLVIEW_H__CC87D2D1_6328_43D6_AE05_DF6F835FECF3__INCLUDED_
#include "PreviewToolDoc.h"
#include "PreView.h"
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


class CPreviewToolView : public CView
{
protected: // create from serialization only
	CPreviewToolView();
	DECLARE_DYNCREATE(CPreviewToolView)
	friend class CPreView;
// Attributes
public:
	CPreviewToolDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CPreviewToolView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	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);
	virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	int screenx,screeny; //获取屏幕每英寸像素数
	int printx,printy;   //获取打印机每英寸像素数
	double ratex,ratey;  //打印机与屏幕的像素比率
	CFont Font;          //文本字体

	CString str[8];
	void SetText();
	virtual ~CPreviewToolView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CPreviewToolView)
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	afx_msg	void OnFilePrintPreview();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in PreviewToolView.cpp
inline CPreviewToolDoc* CPreviewToolView::GetDocument()
   { return (CPreviewToolDoc*)m_pDocument; }
#endif

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

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

#endif // !defined(AFX_PREVIEWTOOLVIEW_H__CC87D2D1_6328_43D6_AE05_DF6F835FECF3__INCLUDED_)

⌨️ 快捷键说明

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