- // MyStatusBarView.cpp : implementation of the CMyStatusBarView class
- //
- #include "stdafx.h"
- #include "MyStatusBar.h"
- #include "MyStatusBarDoc.h"
- #include "MyStatusBarView.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CMyStatusBarView
- IMPLEMENT_DYNCREATE(CMyStatusBarView, CView)
- BEGIN_MESSAGE_MAP(CMyStatusBarView, CView)
- //{{AFX_MSG_MAP(CMyStatusBarView)
- ON_WM_LBUTTONDOWN()
- //}}AFX_MSG_MAP
- // Standard printing commands
- ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
- ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
- ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CMyStatusBarView construction/destruction
- CMyStatusBarView::CMyStatusBarView()
- {
- // TODO: add construction code here
- }
- CMyStatusBarView::~CMyStatusBarView()
- {
- }
- BOOL CMyStatusBarView::PreCreateWindow(CREATESTRUCT& cs)
- {
- // TODO: Modify the Window class or styles here by modifying
- // the CREATESTRUCT cs
- return CView::PreCreateWindow(cs);
- }
- /////////////////////////////////////////////////////////////////////////////
- // CMyStatusBarView drawing
- void CMyStatusBarView::OnDraw(CDC* pDC)
- {
- CMyStatusBarDoc* pDoc = GetDocument();
- ASSERT_VALID(pDoc);
- // TODO: add draw code for native data here
- }
- /////////////////////////////////////////////////////////////////////////////
- // CMyStatusBarView printing
- BOOL CMyStatusBarView::OnPreparePrinting(CPrintInfo* pInfo)
- {
- // default preparation
- return DoPreparePrinting(pInfo);
- }
- void CMyStatusBarView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
- {
- // TODO: add extra initialization before printing
- }
- void CMyStatusBarView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
- {
- // TODO: add cleanup after printing
- }
- /////////////////////////////////////////////////////////////////////////////
- // CMyStatusBarView diagnostics
- #ifdef _DEBUG
- void CMyStatusBarView::AssertValid() const
- {
- CView::AssertValid();
- }
- void CMyStatusBarView::Dump(CDumpContext& dc) const
- {
- CView::Dump(dc);
- }
- CMyStatusBarDoc* CMyStatusBarView::GetDocument() // non-debug version is inline
- {
- ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMyStatusBarDoc)));
- return (CMyStatusBarDoc*)m_pDocument;
- }
- #endif //_DEBUG
- /////////////////////////////////////////////////////////////////////////////
- // CMyStatusBarView message handlers
- void CMyStatusBarView::test()
- {
- AfxMessageBox("frkodf");
- }
- void CMyStatusBarView::OnLButtonDown(UINT nFlags, CPoint point)
- {
- // TODO: Add your message handler code here and/or call default
- CView::OnLButtonDown(nFlags, point);
- }