home *** CD-ROM | disk | FTP | other *** search
- // sayview.cpp : implementation of the CSayView class
- //
-
- #include "stdafx.h"
- #include "say.h"
-
- #include "saydoc.h"
- #include "sayview.h"
-
- #ifdef _DEBUG
- #undef THIS_FILE
- static char BASED_CODE THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CSayView
-
- IMPLEMENT_DYNCREATE(CSayView, CView)
-
- BEGIN_MESSAGE_MAP(CSayView, CView)
- //{{AFX_MSG_MAP(CSayView)
- ON_COMMAND(ID_FILE_SAYHELLO, OnFileSayhello)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
- /////////////////////////////////////////////////////////////////////////////
- // CSayView construction/destruction
-
- CSayView::CSayView()
- {
- // TODO: add construction code here
- }
-
- CSayView::~CSayView()
- {
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // CSayView drawing
-
- void CSayView::OnDraw(CDC* pDC)
- {
- CSayDoc* pDoc = GetDocument();
- ASSERT_VALID(pDoc);
-
- // TODO: add draw code for native data here
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // CSayView diagnostics
-
- #ifdef _DEBUG
- void CSayView::AssertValid() const
- {
- CView::AssertValid();
- }
-
- void CSayView::Dump(CDumpContext& dc) const
- {
- CView::Dump(dc);
- }
-
- CSayDoc* CSayView::GetDocument() // non-debug version is inline
- {
- ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSayDoc)));
- return (CSayDoc*)m_pDocument;
- }
- #endif //_DEBUG
-
- /////////////////////////////////////////////////////////////////////////////
- // CSayView message handlers
-
- void CSayView::OnFileSayhello()
- {
- // TODO: Add your command handler code here
-
- /////////////////////////
- // MY CODE STARTS HERE //
- /////////////////////////
-
- MessageBox ("Hello! Have a nice day!");
-
- ///////////////////////
- // MY CODE ENDS HERE //
- ///////////////////////
-
-
- }
-