OutlookBarView.cpp
上传用户:szled88
上传日期:2015-04-09
资源大小:43957k
文件大小:4k
源码类别:

对话框与窗口

开发平台:

Visual C++

  1. // OutlookBarView.cpp : implementation of the COutlookBarView class
  2. //
  3. // This file is a part of the XTREME TOOLKIT PRO MFC class library.
  4. // (c)1998-2008 Codejock Software, All Rights Reserved.
  5. //
  6. // THIS SOURCE FILE IS THE PROPERTY OF CODEJOCK SOFTWARE AND IS NOT TO BE
  7. // RE-DISTRIBUTED BY ANY MEANS WHATSOEVER WITHOUT THE EXPRESSED WRITTEN
  8. // CONSENT OF CODEJOCK SOFTWARE.
  9. //
  10. // THIS SOURCE CODE CAN ONLY BE USED UNDER THE TERMS AND CONDITIONS OUTLINED
  11. // IN THE XTREME TOOLKIT PRO LICENSE AGREEMENT. CODEJOCK SOFTWARE GRANTS TO
  12. // YOU (ONE SOFTWARE DEVELOPER) THE LIMITED RIGHT TO USE THIS SOFTWARE ON A
  13. // SINGLE COMPUTER.
  14. //
  15. // CONTACT INFORMATION:
  16. // support@codejock.com
  17. // http://www.codejock.com
  18. //
  19. /////////////////////////////////////////////////////////////////////////////
  20. #include "stdafx.h"
  21. #include "OutlookBar.h"
  22. #include "OutlookBarDoc.h"
  23. #include "OutlookBarView.h"
  24. #ifdef _DEBUG
  25. #define new DEBUG_NEW
  26. #undef THIS_FILE
  27. static char THIS_FILE[] = __FILE__;
  28. #endif
  29. /////////////////////////////////////////////////////////////////////////////
  30. // COutlookBarView
  31. IMPLEMENT_DYNCREATE(COutlookBarView, CListView)
  32. BEGIN_MESSAGE_MAP(COutlookBarView, CListView)
  33. //{{AFX_MSG_MAP(COutlookBarView)
  34. // NOTE - the ClassWizard will add and remove mapping macros here.
  35. //    DO NOT EDIT what you see in these blocks of generated code!
  36. //}}AFX_MSG_MAP
  37. // Standard printing commands
  38. ON_COMMAND(ID_FILE_PRINT, CListView::OnFilePrint)
  39. ON_COMMAND(ID_FILE_PRINT_DIRECT, CListView::OnFilePrint)
  40. ON_COMMAND(ID_FILE_PRINT_PREVIEW, CListView::OnFilePrintPreview)
  41. END_MESSAGE_MAP()
  42. /////////////////////////////////////////////////////////////////////////////
  43. // COutlookBarView construction/destruction
  44. COutlookBarView::COutlookBarView()
  45. {
  46. // TODO: add construction code here
  47. }
  48. COutlookBarView::~COutlookBarView()
  49. {
  50. }
  51. BOOL COutlookBarView::PreCreateWindow(CREATESTRUCT& cs)
  52. {
  53. // TODO: Modify the Window class or styles here by modifying
  54. //  the CREATESTRUCT cs
  55. return CListView::PreCreateWindow(cs);
  56. }
  57. /////////////////////////////////////////////////////////////////////////////
  58. // COutlookBarView drawing
  59. void COutlookBarView::OnDraw(CDC* /*pDC*/)
  60. {
  61. CListCtrl& refCtrl = GetListCtrl();
  62. refCtrl.InsertItem(0, _T("Item!"));
  63. }
  64. void COutlookBarView::OnInitialUpdate()
  65. {
  66. CListView::OnInitialUpdate();
  67. // TODO: You may populate your ListView with items by directly accessing
  68. //  its list control through a call to GetListCtrl().
  69. }
  70. /////////////////////////////////////////////////////////////////////////////
  71. // COutlookBarView printing
  72. BOOL COutlookBarView::OnPreparePrinting(CPrintInfo* pInfo)
  73. {
  74. // default preparation
  75. return DoPreparePrinting(pInfo);
  76. }
  77. void COutlookBarView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
  78. {
  79. // TODO: add extra initialization before printing
  80. }
  81. void COutlookBarView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
  82. {
  83. // TODO: add cleanup after printing
  84. }
  85. /////////////////////////////////////////////////////////////////////////////
  86. // COutlookBarView diagnostics
  87. #ifdef _DEBUG
  88. void COutlookBarView::AssertValid() const
  89. {
  90. CListView::AssertValid();
  91. }
  92. void COutlookBarView::Dump(CDumpContext& dc) const
  93. {
  94. CListView::Dump(dc);
  95. }
  96. COutlookBarDoc* COutlookBarView::GetDocument() // non-debug version is inline
  97. {
  98. ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(COutlookBarDoc)));
  99. return (COutlookBarDoc*)m_pDocument;
  100. }
  101. #endif //_DEBUG
  102. /////////////////////////////////////////////////////////////////////////////
  103. // COutlookBarView message handlers
  104. void COutlookBarView::OnStyleChanged(int /*nStyleType*/, LPSTYLESTRUCT /*lpStyleStruct*/)
  105. {
  106. //TODO: add code to react to the user changing the view style of your window
  107. }