ViewTree.cpp 879 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. 
  2. #include "pch.h"
  3. #include "framework.h"
  4. #include "ViewTree.h"
  5. #ifdef _DEBUG
  6. #define new DEBUG_NEW
  7. #undef THIS_FILE
  8. static char THIS_FILE[] = __FILE__;
  9. #endif
  10. /////////////////////////////////////////////////////////////////////////////
  11. // CViewTree
  12. CViewTree::CViewTree() noexcept
  13. {
  14. }
  15. CViewTree::~CViewTree()
  16. {
  17. }
  18. BEGIN_MESSAGE_MAP(CViewTree, CTreeCtrl)
  19. END_MESSAGE_MAP()
  20. /////////////////////////////////////////////////////////////////////////////
  21. // CViewTree 消息处理程序
  22. BOOL CViewTree::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
  23. {
  24. BOOL bRes = CTreeCtrl::OnNotify(wParam, lParam, pResult);
  25. NMHDR* pNMHDR = (NMHDR*)lParam;
  26. ASSERT(pNMHDR != nullptr);
  27. if (pNMHDR && pNMHDR->code == TTN_SHOW && GetToolTips() != nullptr)
  28. {
  29. GetToolTips()->SetWindowPos(&wndTop, -1, -1, -1, -1, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOSIZE);
  30. }
  31. return bRes;
  32. }