📄 example_2view.h
字号:
// Example_2View.h : interface of the CExample_2View class
//
/////////////////////////////////////////////////////////////////////////////
#include <math.h>
#if !defined(AFX_EXAMPLE_2VIEW_H__DB23AB09_B046_4225_822A_C41A47D765A1__INCLUDED_)
#define AFX_EXAMPLE_2VIEW_H__DB23AB09_B046_4225_822A_C41A47D765A1__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
const int DRAWWIDTH=9921; //9921图形的宽度,在此处设置为A4的宽度(MM_TWIPS映设下);
const int DRAWHEIGHT=28062;//图形的的高度,在此处设置为A4的高度的2倍。这样设置的图形宽度刚好能容纳2个A4页面。以显示分页打印的效果
class CExample_2View : public CScrollView
{
protected: // create from serialization only
CExample_2View();
DECLARE_DYNCREATE(CExample_2View)
int m_NumCols,m_NumRows;
int m_PageHeight,m_PageWidth;
// Attributes
public:
CExample_2Doc* GetDocument();
// Operations
public:
//
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CExample_2View)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo = NULL);
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
protected:
virtual void OnInitialUpdate(); // called first time after construct
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
int m_option;
void Dbar(int n,CString fdn);
virtual ~CExample_2View();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CExample_2View)
afx_msg void OnIndex1();
afx_msg void OnIndex2();
afx_msg void OnIndex3();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
CString fdn;
int n;
};
#ifndef _DEBUG // debug version in Example_2View.cpp
inline CExample_2Doc* CExample_2View::GetDocument()
{ return (CExample_2Doc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_EXAMPLE_2VIEW_H__DB23AB09_B046_4225_822A_C41A47D765A1__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -