PrintView.h
上传用户:dztljd
上传日期:2007-01-04
资源大小:55k
文件大小:2k
源码类别:

打印编程

开发平台:

Visual C++

  1. // PrintView.h : interface of the CPrintView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_PRINTVIEW_H__015023DE_F3FD_11D1_BF9F_0020AFF340CF__INCLUDED_)
  5. #define AFX_PRINTVIEW_H__015023DE_F3FD_11D1_BF9F_0020AFF340CF__INCLUDED_
  6. #if _MSC_VER >= 1000
  7. #pragma once
  8. #endif // _MSC_VER >= 1000
  9. class CPrintView : public CFormView
  10. {
  11. protected: // create from serialization only
  12. CPrintView();
  13. DECLARE_DYNCREATE(CPrintView)
  14. public:
  15. CRect m_rect;
  16. CBitmap * m_pBm;
  17. CDC * m_pMemDC;
  18. //{{AFX_DATA(CPrintView)
  19. enum{ IDD = IDD_PRINT_FORM };
  20. // NOTE: the ClassWizard will add data members here
  21. //}}AFX_DATA
  22. // Attributes
  23. public:
  24. CPrintDoc* GetDocument();
  25. // Operations
  26. public:
  27. // Overrides
  28. // ClassWizard generated virtual function overrides
  29. //{{AFX_VIRTUAL(CPrintView)
  30. public:
  31. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  32. protected:
  33. virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  34. virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  35. virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  36. virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  37. virtual void OnPrint(CDC* pDC, CPrintInfo*);
  38. //}}AFX_VIRTUAL
  39. // Implementation
  40. public:
  41. virtual ~CPrintView();
  42. #ifdef _DEBUG
  43. virtual void AssertValid() const;
  44. virtual void Dump(CDumpContext& dc) const;
  45. #endif
  46. protected:
  47. // Generated message map functions
  48. protected:
  49. //{{AFX_MSG(CPrintView)
  50. // NOTE - the ClassWizard will add and remove member functions here.
  51. //    DO NOT EDIT what you see in these blocks of generated code !
  52. //}}AFX_MSG
  53. DECLARE_MESSAGE_MAP()
  54. };
  55. #ifndef _DEBUG  // debug version in PrintView.cpp
  56. inline CPrintDoc* CPrintView::GetDocument()
  57.    { return (CPrintDoc*)m_pDocument; }
  58. #endif
  59. /////////////////////////////////////////////////////////////////////////////
  60. //{{AFX_INSERT_LOCATION}}
  61. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  62. #endif // !defined(AFX_PRINTVIEW_H__015023DE_F3FD_11D1_BF9F_0020AFF340CF__INCLUDED_)