PropertiesWnd.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. 
  2. #pragma once
  3. class CPropertiesToolBar : public CMFCToolBar
  4. {
  5. public:
  6. virtual void OnUpdateCmdUI(CFrameWnd* /*pTarget*/, BOOL bDisableIfNoHndler)
  7. {
  8. CMFCToolBar::OnUpdateCmdUI((CFrameWnd*) GetOwner(), bDisableIfNoHndler);
  9. }
  10. virtual BOOL AllowShowOnList() const { return FALSE; }
  11. };
  12. class CPropertiesWnd : public CDockablePane
  13. {
  14. // 构造
  15. public:
  16. CPropertiesWnd() noexcept;
  17. void AdjustLayout();
  18. // 特性
  19. public:
  20. void SetVSDotNetLook(BOOL bSet)
  21. {
  22. m_wndPropList.SetVSDotNetLook(bSet);
  23. m_wndPropList.SetGroupNameFullWidth(bSet);
  24. }
  25. protected:
  26. CFont m_fntPropList;
  27. CComboBox m_wndObjectCombo;
  28. CPropertiesToolBar m_wndToolBar;
  29. CMFCPropertyGridCtrl m_wndPropList;
  30. // 实现
  31. public:
  32. virtual ~CPropertiesWnd();
  33. protected:
  34. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  35. afx_msg void OnSize(UINT nType, int cx, int cy);
  36. afx_msg void OnExpandAllProperties();
  37. afx_msg void OnUpdateExpandAllProperties(CCmdUI* pCmdUI);
  38. afx_msg void OnSortProperties();
  39. afx_msg void OnUpdateSortProperties(CCmdUI* pCmdUI);
  40. afx_msg void OnProperties1();
  41. afx_msg void OnUpdateProperties1(CCmdUI* pCmdUI);
  42. afx_msg void OnProperties2();
  43. afx_msg void OnUpdateProperties2(CCmdUI* pCmdUI);
  44. afx_msg void OnSetFocus(CWnd* pOldWnd);
  45. afx_msg void OnSettingChange(UINT uFlags, LPCTSTR lpszSection);
  46. DECLARE_MESSAGE_MAP()
  47. void InitPropList();
  48. void SetPropListFont();
  49. int m_nComboHeight;
  50. };