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.

94 lines
1.7 KiB

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