~ubuntu-branches/ubuntu/precise/cmake/precise-updates

« back to all changes in this revision

Viewing changes to Tests/MFC/mfc1/mfc1View.cpp

  • Committer: Package Import Robot
  • Author(s): Rohan Garg
  • Date: 2012-01-17 23:04:07 UTC
  • mfrom: (1.13.6)
  • Revision ID: package-import@ubuntu.com-20120117230407-14cdb6g0mxmh29bl
Tags: 2.8.7-0ubuntu1
* New upstream release
  - Add increase_ctest_test_timeout.diff to increase timeout period
    of a test

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// mfc1View.cpp : implementation of the Cmfc1View class
 
2
//
 
3
 
 
4
#include "stdafx.h"
 
5
#include "mfc1.h"
 
6
 
 
7
#include "mfc1Doc.h"
 
8
#include "mfc1View.h"
 
9
 
 
10
#ifdef _DEBUG
 
11
#define new DEBUG_NEW
 
12
#endif
 
13
 
 
14
 
 
15
// Cmfc1View
 
16
 
 
17
IMPLEMENT_DYNCREATE(Cmfc1View, CView)
 
18
 
 
19
BEGIN_MESSAGE_MAP(Cmfc1View, CView)
 
20
        // Standard printing commands
 
21
        ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
 
22
        ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
 
23
        ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
 
24
END_MESSAGE_MAP()
 
25
 
 
26
// Cmfc1View construction/destruction
 
27
 
 
28
Cmfc1View::Cmfc1View()
 
29
{
 
30
        // TODO: add construction code here
 
31
 
 
32
}
 
33
 
 
34
Cmfc1View::~Cmfc1View()
 
35
{
 
36
}
 
37
 
 
38
BOOL Cmfc1View::PreCreateWindow(CREATESTRUCT& cs)
 
39
{
 
40
        // TODO: Modify the Window class or styles here by modifying
 
41
        //  the CREATESTRUCT cs
 
42
 
 
43
        return CView::PreCreateWindow(cs);
 
44
}
 
45
 
 
46
// Cmfc1View drawing
 
47
 
 
48
void Cmfc1View::OnDraw(CDC* /*pDC*/)
 
49
{
 
50
        Cmfc1Doc* pDoc = GetDocument();
 
51
        ASSERT_VALID(pDoc);
 
52
        if (!pDoc)
 
53
                return;
 
54
 
 
55
        // TODO: add draw code for native data here
 
56
}
 
57
 
 
58
 
 
59
// Cmfc1View printing
 
60
 
 
61
BOOL Cmfc1View::OnPreparePrinting(CPrintInfo* pInfo)
 
62
{
 
63
        // default preparation
 
64
        return DoPreparePrinting(pInfo);
 
65
}
 
66
 
 
67
void Cmfc1View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
 
68
{
 
69
        // TODO: add extra initialization before printing
 
70
}
 
71
 
 
72
void Cmfc1View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
 
73
{
 
74
        // TODO: add cleanup after printing
 
75
}
 
76
 
 
77
 
 
78
// Cmfc1View diagnostics
 
79
 
 
80
#ifdef _DEBUG
 
81
void Cmfc1View::AssertValid() const
 
82
{
 
83
        CView::AssertValid();
 
84
}
 
85
 
 
86
void Cmfc1View::Dump(CDumpContext& dc) const
 
87
{
 
88
        CView::Dump(dc);
 
89
}
 
90
 
 
91
Cmfc1Doc* Cmfc1View::GetDocument() const // non-debug version is inline
 
92
{
 
93
        ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(Cmfc1Doc)));
 
94
        return (Cmfc1Doc*)m_pDocument;
 
95
}
 
96
#endif //_DEBUG
 
97
 
 
98
 
 
99
// Cmfc1View message handlers