home *** CD-ROM | disk | FTP | other *** search
- // WinGrVw.cpp : implementation of the CWinGreetView class
- //
-
- #include "stdafx.h"
- #include "WinGreet.h"
-
- #include "WinGrDoc.h"
- #include "WinGrVw.h"
-
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CWinGreetView
-
- IMPLEMENT_DYNCREATE(CWinGreetView, CView)
-
- BEGIN_MESSAGE_MAP(CWinGreetView, CView)
- //{{AFX_MSG_MAP(CWinGreetView)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- // DO NOT EDIT what you see in these blocks of generated code!
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
- /////////////////////////////////////////////////////////////////////////////
- // CWinGreetView construction/destruction
-
- CWinGreetView::CWinGreetView()
- {
- // TODO: add construction code here
-
- }
-
- CWinGreetView::~CWinGreetView()
- {
- }
-
- BOOL CWinGreetView::PreCreateWindow(CREATESTRUCT& cs)
- {
- // TODO: Modify the Window class or styles here by modifying
- // the CREATESTRUCT cs
-
- return CView::PreCreateWindow(cs);
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // CWinGreetView drawing
-
- void CWinGreetView::OnDraw(CDC* pDC)
- {
- CWinGreetDoc* pDoc = GetDocument();
- ASSERT_VALID(pDoc);
-
- // TODO: add draw code for native data here
-
- RECT ClientRect;
- GetClientRect (&ClientRect);
- pDC->DrawText
- (pDoc->GetMessage (), // obtain the string
- -1,
- &ClientRect,
- DT_CENTER | DT_VCENTER | DT_SINGLELINE);
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // CWinGreetView diagnostics
-
- #ifdef _DEBUG
- void CWinGreetView::AssertValid() const
- {
- CView::AssertValid();
- }
-
- void CWinGreetView::Dump(CDumpContext& dc) const
- {
- CView::Dump(dc);
- }
-
- CWinGreetDoc* CWinGreetView::GetDocument() // non-debug version is inline
- {
- ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CWinGreetDoc)));
- return (CWinGreetDoc*)m_pDocument;
- }
- #endif //_DEBUG
-
- /////////////////////////////////////////////////////////////////////////////
- // CWinGreetView message handlers
-