TreeViewDlg.h
上传用户:wrlxzs
上传日期:2022-03-24
资源大小:20k
文件大小:2k
源码类别:

TreeView控件

开发平台:

Visual C++

  1. // TreeViewDlg.h : header file
  2. // Download by http://www.codefans.net
  3. #if !defined(AFX_TREEVIEWDLG_H__CC9C0CD9_217D_4A65_9678_982A1C812037__INCLUDED_)
  4. #define AFX_TREEVIEWDLG_H__CC9C0CD9_217D_4A65_9678_982A1C812037__INCLUDED_
  5. #if _MSC_VER > 1000
  6. #pragma once
  7. #endif // _MSC_VER > 1000
  8. /////////////////////////////////////////////////////////////////////////////
  9. // CTreeViewDlg dialog
  10. class CTreeViewDlg : public CDialog
  11. {
  12. // Construction
  13. public:
  14. void AddSubDir(HTREEITEM hParent);
  15. CString GetFullPath(HTREEITEM hCurrent);
  16. void GetDriveDir(HTREEITEM hParent);
  17. void GetLogicalDrives(HTREEITEM hParen);
  18. CTreeViewDlg(CWnd* pParent = NULL); // standard constructor
  19. // Dialog Data
  20. //{{AFX_DATA(CTreeViewDlg)
  21. enum { IDD = IDD_TREEVIEW_DIALOG };
  22. CTreeCtrl m_tree;
  23. CListCtrl m_list;
  24. //}}AFX_DATA
  25. // ClassWizard generated virtual function overrides
  26. //{{AFX_VIRTUAL(CTreeViewDlg)
  27. protected:
  28. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  29. //}}AFX_VIRTUAL
  30. // Implementation
  31. protected:
  32. HICON m_hIcon;
  33.     HTREEITEM m_hRoot;
  34. CImageList m_ImageList;
  35. // Generated message map functions
  36. //{{AFX_MSG(CTreeViewDlg)
  37. virtual BOOL OnInitDialog();
  38. afx_msg void OnPaint();
  39. afx_msg HCURSOR OnQueryDragIcon();
  40. afx_msg void OnItemexpandedTree(NMHDR* pNMHDR, LRESULT* pResult);
  41. afx_msg void OnSelchangedTree(NMHDR* pNMHDR, LRESULT* pResult);
  42. afx_msg void OnSelchangingTree(NMHDR* pNMHDR, LRESULT* pResult);
  43. afx_msg void OnClickTree(NMHDR* pNMHDR, LRESULT* pResult);
  44. //}}AFX_MSG
  45. DECLARE_MESSAGE_MAP()
  46. };
  47. //{{AFX_INSERT_LOCATION}}
  48. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  49. #endif // !defined(AFX_TREEVIEWDLG_H__CC9C0CD9_217D_4A65_9678_982A1C812037__INCLUDED_)