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

TreeView控件

开发平台:

Visual C++

  1. // TreeMenuDemoView.cpp : implementation of the CTreeMenuDemoView class
  2. //
  3. #include "stdafx.h"
  4. #include "TreeMenuDemo.h"
  5. #include "TreeMenuDemoDoc.h"
  6. #include "TreeMenuDemoView.h"
  7. #ifdef _DEBUG
  8. #define new DEBUG_NEW
  9. #undef THIS_FILE
  10. static char THIS_FILE[] = __FILE__;
  11. #endif
  12. /////////////////////////////////////////////////////////////////////////////
  13. // CTreeMenuDemoView
  14. IMPLEMENT_DYNCREATE(CTreeMenuDemoView, CView)
  15. BEGIN_MESSAGE_MAP(CTreeMenuDemoView, CView)
  16. //{{AFX_MSG_MAP(CTreeMenuDemoView)
  17. // NOTE - the ClassWizard will add and remove mapping macros here.
  18. //    DO NOT EDIT what you see in these blocks of generated code!
  19. //}}AFX_MSG_MAP
  20. END_MESSAGE_MAP()
  21. /////////////////////////////////////////////////////////////////////////////
  22. // CTreeMenuDemoView construction/destruction
  23. CTreeMenuDemoView::CTreeMenuDemoView()
  24. {
  25. // TODO: add construction code here
  26. }
  27. CTreeMenuDemoView::~CTreeMenuDemoView()
  28. {
  29. }
  30. BOOL CTreeMenuDemoView::PreCreateWindow(CREATESTRUCT& cs)
  31. {
  32. // TODO: Modify the Window class or styles here by modifying
  33. //  the CREATESTRUCT cs
  34. return CView::PreCreateWindow(cs);
  35. }
  36. /////////////////////////////////////////////////////////////////////////////
  37. // CTreeMenuDemoView drawing
  38. void CTreeMenuDemoView::OnDraw(CDC* pDC)
  39. {
  40. CTreeMenuDemoDoc* pDoc = GetDocument();
  41. ASSERT_VALID(pDoc);
  42. // TODO: add draw code for native data here
  43. }
  44. /////////////////////////////////////////////////////////////////////////////
  45. // CTreeMenuDemoView diagnostics
  46. #ifdef _DEBUG
  47. void CTreeMenuDemoView::AssertValid() const
  48. {
  49. CView::AssertValid();
  50. }
  51. void CTreeMenuDemoView::Dump(CDumpContext& dc) const
  52. {
  53. CView::Dump(dc);
  54. }
  55. CTreeMenuDemoDoc* CTreeMenuDemoView::GetDocument() // non-debug version is inline
  56. {
  57. ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CTreeMenuDemoDoc)));
  58. return (CTreeMenuDemoDoc*)m_pDocument;
  59. }
  60. #endif //_DEBUG
  61. /////////////////////////////////////////////////////////////////////////////
  62. // CTreeMenuDemoView message handlers