STATUSBARVIEW.CPP
Upload User: bjaaa555
Upload Date: 2013-01-31
Package Size: 40k
Code Size: 2k
Category:

StatusBar

Development Platform:

Visual C++

  1. #include "stdafx.h"
  2. #include "StatusBar.h"
  3. #include "StatusBarDoc.h"
  4. #include "StatusBarView.h"
  5. #ifdef _DEBUG
  6. #define new DEBUG_NEW
  7. #undef THIS_FILE
  8. static char THIS_FILE[] = __FILE__;
  9. #endif
  10. IMPLEMENT_DYNCREATE(CStatusBarView, CView)
  11. BEGIN_MESSAGE_MAP(CStatusBarView, CView)
  12. //{{AFX_MSG_MAP(CStatusBarView)
  13. // HINWEIS - Hier werden Mapping-Makros vom Klassen-Assistenten eingef黦t und entfernt.
  14. //    Innerhalb dieser generierten Quelltextabschnitte NICHTS VER腘DERN!
  15. //}}AFX_MSG_MAP
  16. // Standard-Druckbefehle
  17. ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
  18. ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
  19. ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
  20. END_MESSAGE_MAP()
  21. CStatusBarView::CStatusBarView() { }
  22. CStatusBarView::~CStatusBarView() { }
  23. BOOL CStatusBarView::PreCreateWindow(CREATESTRUCT& cs) { return CView::PreCreateWindow(cs); }
  24. void CStatusBarView::OnDraw(CDC* pDC)
  25. {
  26. CStatusBarDoc* pDoc = GetDocument();
  27. ASSERT_VALID(pDoc);
  28. CRect rect(0, 0, 1000, 1000);
  29. pDC->DrawText( "The panes are defined as follows:nn"
  30. "Pane 0:   Message Pane (Mode: Text, Left: Scrollbar, Right: toggle to Bitmap-Mode)n"
  31. "Pane 1:   COUNT (Mode: Number, Left: increase, Right: decrease)n"
  32. "Pane 2:   CAPS (Mode: Text, Left: HScroll on/off, Right: VScroll on/off)n"
  33. "Pane 3:   NUM (Mode: Text, Left: change fontsize, Right: change fontname)n"
  34. "Pane 4:   INSERT (Mode: Bitmap,Repeat, Left: HScroll on/off, Right: VScroll on/off)n"
  35. "Pane 5:   SCROLL (Mode: Bitmap,Stretch, Left: Counter, Right: Smooth scrollbarnnn"
  36. "When you doubleclick the panes, the appearance of the pane changes. There aren"
  37. "different actions if you use the left or the right mousebutton.",
  38. rect, DT_LEFT | DT_TOP);
  39. }
  40. BOOL CStatusBarView::OnPreparePrinting(CPrintInfo* pInfo) { return DoPreparePrinting(pInfo); }
  41. void CStatusBarView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) {}
  42. void CStatusBarView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) {}
  43. #ifdef _DEBUG
  44. void CStatusBarView::AssertValid() const { CView::AssertValid(); }
  45. void CStatusBarView::Dump(CDumpContext& dc) const { CView::Dump(dc); }
  46. CStatusBarDoc* CStatusBarView::GetDocument()
  47. {
  48. ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CStatusBarDoc)));
  49. return (CStatusBarDoc*)m_pDocument;
  50. }
  51. #endif //_DEBUG