explorerView.h
上传用户:jorden
上传日期:2022-08-09
资源大小:83k
文件大小:2k
源码类别:

TreeView控件

开发平台:

Visual C++

  1. // explorerView.h : interface of the CExplorerView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_EXPLORERVIEW_H__76658FC6_5804_4F8C_B115_9CDEA723183C__INCLUDED_)
  5. #define AFX_EXPLORERVIEW_H__76658FC6_5804_4F8C_B115_9CDEA723183C__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. class CExplorerView : public CListView
  10. {
  11. protected: // create from serialization only
  12. CExplorerView();
  13. DECLARE_DYNCREATE(CExplorerView)
  14. // Attributes
  15. public:
  16. CExplorerDoc* GetDocument();
  17. CImageList *m_pImageList;
  18. CImageList *m_pImageListL;
  19. // Operations
  20. public:
  21. // Overrides
  22. // ClassWizard generated virtual function overrides
  23. //{{AFX_VIRTUAL(CExplorerView)
  24. public:
  25. virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  26. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  27. protected:
  28. virtual void OnInitialUpdate(); // called first time after construct
  29. virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  30. virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  31. virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  32. //}}AFX_VIRTUAL
  33. // Implementation
  34. public:
  35. virtual ~CExplorerView();
  36. void SetupImages(CImageList *mImageList, int iSize);
  37. UINT GetListViewIcon(CString s);
  38. CString GetFileType(CString s);
  39. LPTSTR GetNTS(CString cString);
  40. void AddToListView(WIN32_FIND_DATA* fd);
  41. void DeleteAllItems();
  42. #ifdef _DEBUG
  43. virtual void AssertValid() const;
  44. virtual void Dump(CDumpContext& dc) const;
  45. #endif
  46. protected:
  47. // Generated message map functions
  48. protected:
  49. //{{AFX_MSG(CExplorerView)
  50. afx_msg void OnDestroy();
  51. afx_msg void OnSize(UINT nType, int cx, int cy);
  52. //}}AFX_MSG
  53. afx_msg void OnStyleChanged(int nStyleType, LPSTYLESTRUCT lpStyleStruct);
  54. DECLARE_MESSAGE_MAP()
  55. };
  56. #ifndef _DEBUG  // debug version in explorerView.cpp
  57. inline CExplorerDoc* CExplorerView::GetDocument()
  58.    { return (CExplorerDoc*)m_pDocument; }
  59. #endif
  60. /////////////////////////////////////////////////////////////////////////////
  61. //{{AFX_INSERT_LOCATION}}
  62. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  63. #endif // !defined(AFX_EXPLORERVIEW_H__76658FC6_5804_4F8C_B115_9CDEA723183C__INCLUDED_)