ListViewDemoView.cpp
上传用户:ayqaqa
上传日期:2007-01-02
资源大小:37k
文件大小:2k
源码类别:

ListView/ListBox

开发平台:

Visual C++

  1. // ListViewDemoView.cpp : implementation of the CListViewDemoView class
  2. //
  3. #include "stdafx.h"
  4. #include "ListViewDemo.h"
  5. #include "ListViewDemoDoc.h"
  6. #include "ListViewDemoView.h"
  7. #ifdef _DEBUG
  8. #define new DEBUG_NEW
  9. #undef THIS_FILE
  10. static char THIS_FILE[] = __FILE__;
  11. #endif
  12. /////////////////////////////////////////////////////////////////////////////
  13. // CListViewDemoView
  14. IMPLEMENT_DYNCREATE(CListViewDemoView, CView)
  15. BEGIN_MESSAGE_MAP(CListViewDemoView, CView)
  16. //{{AFX_MSG_MAP(CListViewDemoView)
  17. //}}AFX_MSG_MAP
  18. // Standard printing commands
  19. ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
  20. ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
  21. ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
  22. END_MESSAGE_MAP()
  23. /////////////////////////////////////////////////////////////////////////////
  24. // CListViewDemoView construction/destruction
  25. CListViewDemoView::CListViewDemoView()
  26. {
  27. }
  28. CListViewDemoView::~CListViewDemoView()
  29. {
  30. }
  31. BOOL CListViewDemoView::PreCreateWindow(CREATESTRUCT& cs)
  32. {
  33. return CView::PreCreateWindow(cs);
  34. }
  35. /////////////////////////////////////////////////////////////////////////////
  36. // CListViewDemoView drawing
  37. void CListViewDemoView::OnDraw(CDC* pDC)
  38. {
  39. CListViewDemoDoc* pDoc = GetDocument();
  40. ASSERT_VALID(pDoc);
  41. }
  42. /////////////////////////////////////////////////////////////////////////////
  43. // CListViewDemoView printing
  44. BOOL CListViewDemoView::OnPreparePrinting(CPrintInfo* pInfo)
  45. {
  46. // default preparation
  47. return DoPreparePrinting(pInfo);
  48. }
  49. void CListViewDemoView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
  50. {
  51. }
  52. void CListViewDemoView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
  53. {
  54. }
  55. /////////////////////////////////////////////////////////////////////////////
  56. // CListViewDemoView diagnostics
  57. #ifdef _DEBUG
  58. void CListViewDemoView::AssertValid() const
  59. {
  60. CView::AssertValid();
  61. }
  62. void CListViewDemoView::Dump(CDumpContext& dc) const
  63. {
  64. CView::Dump(dc);
  65. }
  66. CListViewDemoDoc* CListViewDemoView::GetDocument() // non-debug version is inline
  67. {
  68. ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CListViewDemoDoc)));
  69. return (CListViewDemoDoc*)m_pDocument;
  70. }
  71. #endif //_DEBUG
  72. /////////////////////////////////////////////////////////////////////////////
  73. // CListViewDemoView message handlers