Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
1.5 KiB

  1. // NetTree.h : header file
  2. //
  3. #include "lcwiz.h"
  4. /////////////////////////////////////////////////////////////////////////////
  5. // CNetTreeCtrl window
  6. class CNetTreeCtrl : public CTreeCtrl
  7. {
  8. // Construction
  9. public:
  10. CNetTreeCtrl();
  11. virtual ~CNetTreeCtrl();
  12. // Data members
  13. public:
  14. enum
  15. {
  16. ROOT_LEVEL = 0x0,
  17. DOMAIN_LEVEL = 0x1,
  18. SERVER_LEVEL = 0x2,
  19. BUFFER_SIZE = 0x4000,
  20. MAX_STRING = 0x100,
  21. IMG_ROOT = 0,
  22. IMG_DOMAIN = 1,
  23. IMG_SERVER = 2,
  24. IMG_SIZE = 16,
  25. IMG_GROW = 3,
  26. IMG_MASK = RGB(0xFF, 0xFF, 0xFF)
  27. };
  28. public:
  29. HANDLE m_hHeap;
  30. CImageList m_imagelist;
  31. CTypedPtrList<CPtrList, LPNETRESOURCE> m_ptrlistContainers;
  32. CTypedPtrList<CPtrList, LPTSTR> m_ptrlistStrings;
  33. CWinThread* m_pThread;
  34. CEvent m_event;
  35. BOOL m_bExitThread;
  36. // Attributes
  37. public:
  38. // Operations
  39. public:
  40. BOOL PopulateTree(BOOL bExpand= TRUE, const HTREEITEM hParentBranch = TVI_ROOT, DWORD dwBufSize = BUFFER_SIZE);
  41. void ErrorHandler(const DWORD dwCode);
  42. void NotifyThread(BOOL bExit);
  43. static UINT FillTree(LPVOID pParam);
  44. protected:
  45. void CNetTreeCtrl::PumpMessages();
  46. // Overrides
  47. // ClassWizard generated virtual function overrides
  48. //{{AFX_VIRTUAL(CNetTreeCtrl)
  49. //}}AFX_VIRTUAL
  50. // Implementation
  51. public:
  52. // Generated message map functions
  53. protected:
  54. //{{AFX_MSG(CNetTreeCtrl)
  55. afx_msg void OnItemExpanding(NMHDR* pNMHDR, LRESULT* pResult);
  56. afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
  57. afx_msg void OnDestroy();
  58. //}}AFX_MSG
  59. DECLARE_MESSAGE_MAP()
  60. };
  61. /////////////////////////////////////////////////////////////////////////////