home *** CD-ROM | disk | FTP | other *** search
- // annouvw.cpp : implementation of the CAnnounceView class
- //
-
- #include "stdafx.h"
- #include "announce.h"
-
- #include "annoudoc.h"
- #include "annouvw.h"
-
- #ifdef _DEBUG
- #undef THIS_FILE
- static char BASED_CODE THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CAnnounceView
-
- IMPLEMENT_DYNCREATE(CAnnounceView, CView)
-
- BEGIN_MESSAGE_MAP(CAnnounceView, CView)
- //{{AFX_MSG_MAP(CAnnounceView)
- ON_WM_PAINT()
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
- /////////////////////////////////////////////////////////////////////////////
- // CAnnounceView construction/destruction
-
- CAnnounceView::CAnnounceView()
- {
- // TODO: add construction code here
- }
-
- CAnnounceView::~CAnnounceView()
- {
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // CAnnounceView drawing
-
- void CAnnounceView::OnDraw(CDC* pDC)
- {
- CAnnounceDoc* pDoc = GetDocument();
- ASSERT_VALID(pDoc);
-
- // TODO: add draw code for native data here
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // CAnnounceView diagnostics
-
- #ifdef _DEBUG
- void CAnnounceView::AssertValid() const
- {
- CView::AssertValid();
- }
-
- void CAnnounceView::Dump(CDumpContext& dc) const
- {
- CView::Dump(dc);
- }
-
- CAnnounceDoc* CAnnounceView::GetDocument() // non-debug version is inline
- {
- ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CAnnounceDoc)));
- return (CAnnounceDoc*)m_pDocument;
- }
- #endif //_DEBUG
-
- /////////////////////////////////////////////////////////////////////////////
- // CAnnounceView message handlers
-
- void CAnnounceView::OnPaint()
- {
- CPaintDC dc(this); // device context for painting
-
- // TODO: Add your message handler code here
-
- ///////////////////////
- // MY CODE STARTS HERE
- //////////////////////
-
- // Display instructions inside the application window.
- dc.TextOut(20,30,"Leave this program running...");
- dc.TextOut(20,50,"Then try to exit Windows...");
-
- ////////////////////
- // MY CODE ENDS HERE
- ////////////////////
-
- // Do not call CView::OnPaint() for painting messages
- }
-