home *** CD-ROM | disk | FTP | other *** search
/ distrib.akp.su/Programming/Vb-6+Rus/ / distrib.akp.su.tar / distrib.akp.su / Programming / Vb-6+Rus / COMMON / MSDEV98 / BIN / IDE / DEVGAL.PKG / TEMPLATE / 22344 < prev    next >
Text File  |  1998-06-18  |  3KB  |  110 lines

  1. // $$VAL:BaseViewCpp$$ : implementation of the $$VAL:BaseViewClass$$ class
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "$$VAL:ResInclude$$"
  6.  
  7. #include "$$VAL:BaseViewHeader$$"
  8.  
  9. #ifdef _DEBUG
  10. #undef THIS_FILE
  11. static char THIS_FILE[] = __FILE__;
  12. #endif
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15. // $$VAL:BaseViewClass$$
  16.  
  17. IMPLEMENT_DYNCREATE($$VAL:BaseViewClass$$, CView)
  18.  
  19. BEGIN_MESSAGE_MAP($$VAL:BaseViewClass$$, CView)
  20.     //{{AFX_MSG_MAP($$VAL:BaseViewClass$$)
  21.         // NOTE - the ClassWizard will add and remove mapping macros here.
  22.         //    DO NOT EDIT what you see in these blocks of generated code!
  23.     //}}AFX_MSG_MAP
  24.     // Standard printing commands
  25.     ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
  26.     ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
  27.     ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
  28. END_MESSAGE_MAP()
  29.  
  30. /////////////////////////////////////////////////////////////////////////////
  31. // $$VAL:BaseViewClass$$ construction/destruction
  32.  
  33. $$VAL:BaseViewClass$$::$$VAL:BaseViewClass$$()
  34. {
  35.     // TODO: add construction code here
  36.  
  37. }
  38.  
  39. $$VAL:BaseViewClass$$::~$$VAL:BaseViewClass$$()
  40. {
  41. }
  42.  
  43. BOOL $$VAL:BaseViewClass$$::PreCreateWindow(CREATESTRUCT& cs)
  44. {
  45.     // TODO: Modify the Window class or styles here by modifying
  46.     //  the CREATESTRUCT cs
  47.  
  48.     return CView::PreCreateWindow(cs);
  49. }
  50.  
  51. /////////////////////////////////////////////////////////////////////////////
  52. // $$VAL:BaseViewClass$$ drawing
  53.  
  54. void $$VAL:BaseViewClass$$::OnDraw(CDC* pDC)
  55. {
  56.     $$VAL:BaseDocClass$$* pDoc = GetDocument();
  57.     ASSERT_VALID(pDoc);
  58.  
  59.     HENHMETAFILE hMetaFile = pDoc->GetMetaFile ();
  60.     if (hMetaFile != NULL)
  61.     {
  62.         CRect rect;
  63.         GetClientRect (&rect);
  64.         ::PlayEnhMetaFile (pDC->m_hDC, hMetaFile, &rect);
  65.     }
  66. }
  67.  
  68. /////////////////////////////////////////////////////////////////////////////
  69. // $$VAL:BaseViewClass$$ printing
  70.  
  71. BOOL $$VAL:BaseViewClass$$::OnPreparePrinting(CPrintInfo* pInfo)
  72. {
  73.     // default preparation
  74.     return DoPreparePrinting(pInfo);
  75. }
  76.  
  77. void $$VAL:BaseViewClass$$::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
  78. {
  79.     // TODO: add extra initialization before printing
  80. }
  81.  
  82. void $$VAL:BaseViewClass$$::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
  83. {
  84.     // TODO: add cleanup after printing
  85. }
  86.  
  87. /////////////////////////////////////////////////////////////////////////////
  88. // $$VAL:BaseViewClass$$ diagnostics
  89.  
  90. #ifdef _DEBUG
  91. void $$VAL:BaseViewClass$$::AssertValid() const
  92. {
  93.     CView::AssertValid();
  94. }
  95.  
  96. void $$VAL:BaseViewClass$$::Dump(CDumpContext& dc) const
  97. {
  98.     CView::Dump(dc);
  99. }
  100.  
  101. $$VAL:BaseDocClass$$* $$VAL:BaseViewClass$$::GetDocument() // non-debug version is inline
  102. {
  103.     ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS($$VAL:BaseDocClass$$)));
  104.     return ($$VAL:BaseDocClass$$*)m_pDocument;
  105. }
  106. #endif //_DEBUG
  107.  
  108. /////////////////////////////////////////////////////////////////////////////
  109. // $$VAL:BaseViewClass$$ message handlers
  110.