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

对话框与窗口

开发平台:

Visual C++

  1. // WinExplorerView.cpp : implementation of the CWinExplorerView class
  2. //
  3. #include "stdafx.h"
  4. #include "WinExplorer.h"
  5. #include "WinExplorerDoc.h"
  6. #include "WinExplorerView.h"
  7. #ifdef _DEBUG
  8. #define new DEBUG_NEW
  9. #undef THIS_FILE
  10. static char THIS_FILE[] = __FILE__;
  11. #endif
  12. /////////////////////////////////////////////////////////////////////////////
  13. // CWinExplorerView
  14. IMPLEMENT_DYNCREATE(CWinExplorerView, CView)
  15. BEGIN_MESSAGE_MAP(CWinExplorerView, CView)
  16. //{{AFX_MSG_MAP(CWinExplorerView)
  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. // Standard printing commands
  21. ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
  22. ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
  23. ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
  24. END_MESSAGE_MAP()
  25. /////////////////////////////////////////////////////////////////////////////
  26. // CWinExplorerView construction/destruction
  27. CWinExplorerView::CWinExplorerView()
  28. {
  29. // TODO: add construction code here
  30. }
  31. CWinExplorerView::~CWinExplorerView()
  32. {
  33. }
  34. BOOL CWinExplorerView::PreCreateWindow(CREATESTRUCT& cs)
  35. {
  36. // TODO: Modify the Window class or styles here by modifying
  37. //  the CREATESTRUCT cs
  38. return CView::PreCreateWindow(cs);
  39. }
  40. /////////////////////////////////////////////////////////////////////////////
  41. // CWinExplorerView drawing
  42. void CWinExplorerView::OnDraw(CDC* /*pDC*/)
  43. {
  44. }
  45. /////////////////////////////////////////////////////////////////////////////
  46. // CWinExplorerView printing
  47. BOOL CWinExplorerView::OnPreparePrinting(CPrintInfo* pInfo)
  48. {
  49. // default preparation
  50. return DoPreparePrinting(pInfo);
  51. }
  52. void CWinExplorerView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
  53. {
  54. // TODO: add extra initialization before printing
  55. }
  56. void CWinExplorerView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
  57. {
  58. // TODO: add cleanup after printing
  59. }
  60. /////////////////////////////////////////////////////////////////////////////
  61. // CWinExplorerView diagnostics
  62. #ifdef _DEBUG
  63. void CWinExplorerView::AssertValid() const
  64. {
  65. CView::AssertValid();
  66. }
  67. void CWinExplorerView::Dump(CDumpContext& dc) const
  68. {
  69. CView::Dump(dc);
  70. }
  71. CWinExplorerDoc* CWinExplorerView::GetDocument() // non-debug version is inline
  72. {
  73. ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CWinExplorerDoc)));
  74. return (CWinExplorerDoc*)m_pDocument;
  75. }
  76. #endif //_DEBUG
  77. /////////////////////////////////////////////////////////////////////////////
  78. // CWinExplorerView message handlers