GroupTree.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #if !defined(AFX_GROUPTREE_H__A1F01358_5440_45A8_B402_3F32F46FCAA5__INCLUDED_)
  2. #define AFX_GROUPTREE_H__A1F01358_5440_45A8_B402_3F32F46FCAA5__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // GroupTree.h : header file
  7. //
  8. /////////////////////////////////////////////////////////////////////////////
  9. // CGroupTree window
  10. class CGroupTree : public CTreeCtrl
  11. {
  12. // Construction
  13. public:
  14. CGroupTree();
  15. // Attributes
  16. public:
  17. // Operations
  18. public:
  19. void FillTree();
  20. void SetNotificationWndEx(HWND hWnd) { m_NotificationWnd = hWnd; }
  21. bool m_bHide;
  22. long m_lSelectedFolderID;
  23. long GetSelectedTree();
  24. bool AddNode(CString csText, long lID);
  25. protected:
  26. void FillTree(long lParentID, HTREEITEM hParent);
  27. void SendToParent(long lID);
  28. HWND m_NotificationWnd;
  29. CBitmap m_bmOpenFolder;
  30. CBitmap m_bmClosedFolder;
  31. bool m_bSendAllready;
  32. // Overrides
  33. // ClassWizard generated virtual function overrides
  34. //{{AFX_VIRTUAL(CGroupTree)
  35. public:
  36. virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
  37. //}}AFX_VIRTUAL
  38. // Implementation
  39. public:
  40. virtual ~CGroupTree();
  41. // Generated message map functions
  42. protected:
  43. //{{AFX_MSG(CGroupTree)
  44. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  45. afx_msg void OnSelchanged(NMHDR* pNMHDR, LRESULT* pResult);
  46. afx_msg void OnKillFocus(CWnd* pNewWnd);
  47. afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
  48. afx_msg void OnDblclk(NMHDR* pNMHDR, LRESULT* pResult);
  49. afx_msg void OnKeydown(NMHDR* pNMHDR, LRESULT* pResult);
  50. //}}AFX_MSG
  51. DECLARE_MESSAGE_MAP()
  52. // Generated OLE dispatch map functions
  53. //{{AFX_DISPATCH(CGroupTree)
  54. // NOTE - the ClassWizard will add and remove member functions here.
  55. //}}AFX_DISPATCH
  56. };
  57. /////////////////////////////////////////////////////////////////////////////
  58. //{{AFX_INSERT_LOCATION}}
  59. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  60. #endif // !defined(AFX_GROUPTREE_H__A1F01358_5440_45A8_B402_3F32F46FCAA5__INCLUDED_)