GroupTree.h 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. #include "Accels.h"
  9. /////////////////////////////////////////////////////////////////////////////
  10. // CGroupTree window
  11. class CGroupTree : public CTreeCtrl
  12. {
  13. // Construction
  14. public:
  15. CGroupTree();
  16. // Attributes
  17. public:
  18. // Operations
  19. public:
  20. void FillTree();
  21. void SetNotificationWndEx(HWND hWnd) { m_NotificationWnd = hWnd; }
  22. bool m_bHide;
  23. int m_selectedFolderID;
  24. int GetSelectedTree();
  25. bool AddNode(CString csText, int id);
  26. bool m_showRightClickMenu;
  27. protected:
  28. void FillTree(int parentId, HTREEITEM hParent);
  29. void SendToParent(int parentId);
  30. UINT GetSelectedCount() const;
  31. bool CheckActions(MSG * pMsg);
  32. bool DoAction(DWORD actionId);
  33. bool DoActionNewGroup();
  34. bool DoActionDeleteSelected();
  35. bool DoActionClipProperties();
  36. void UpdateMenuShortCut(CCmdUI *pCmdUI, DWORD action);
  37. HWND m_NotificationWnd;
  38. CBitmap m_bmOpenFolder;
  39. CBitmap m_bmClosedFolder;
  40. bool m_bSendAllready;
  41. CAccels m_actions;
  42. // Overrides
  43. // ClassWizard generated virtual function overrides
  44. //{{AFX_VIRTUAL(CGroupTree)
  45. public:
  46. virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
  47. virtual BOOL PreTranslateMessage(MSG *pMsg);
  48. //}}AFX_VIRTUAL
  49. // Implementation
  50. public:
  51. virtual ~CGroupTree();
  52. // Generated message map functions
  53. protected:
  54. //{{AFX_MSG(CGroupTree)
  55. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  56. afx_msg void OnSelchanged(NMHDR* pNMHDR, LRESULT* pResult);
  57. afx_msg void OnKillFocus(CWnd* pNewWnd);
  58. afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
  59. afx_msg void OnDblclk(NMHDR* pNMHDR, LRESULT* pResult);
  60. afx_msg void OnKeydown(NMHDR* pNMHDR, LRESULT* pResult);
  61. afx_msg void OnRclickQuickPaste(NMHDR *pNMHDR, LRESULT *pResult);
  62. afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
  63. //}}AFX_MSG
  64. DECLARE_MESSAGE_MAP()
  65. // Generated OLE dispatch map functions
  66. //{{AFX_DISPATCH(CGroupTree)
  67. // NOTE - the ClassWizard will add and remove member functions here.
  68. //}}AFX_DISPATCH
  69. public:
  70. afx_msg void OnMenuNewgroup32896();
  71. afx_msg void OnMenuDeletegroup();
  72. afx_msg void OnMenuProperties32898();
  73. afx_msg void OnUpdateMenuNewgroup32896(CCmdUI *pCmdUI);
  74. afx_msg void OnUpdateMenuDeletegroup(CCmdUI *pCmdUI);
  75. afx_msg void OnUpdateMenuProperties32898(CCmdUI *pCmdUI);
  76. afx_msg void OnInitMenuPopup(CMenu *pPopupMenu, UINT nIndex,BOOL bSysMenu);
  77. };
  78. /////////////////////////////////////////////////////////////////////////////
  79. //{{AFX_INSERT_LOCATION}}
  80. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  81. #endif // !defined(AFX_GROUPTREE_H__A1F01358_5440_45A8_B402_3F32F46FCAA5__INCLUDED_)