DevicesWnd.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面
  2. // (“Fluent UI”)。该示例仅供参考,
  3. // 用以补充《Microsoft 基础类参考》和
  4. // MFC C++ 库软件随附的相关电子文档。
  5. // 复制、使用或分发 Fluent UI 的许可条款是单独提供的。
  6. // 若要了解有关 Fluent UI 许可计划的详细信息,请访问
  7. // https://go.microsoft.com/fwlink/?LinkId=238214.
  8. //
  9. // 版权所有(C) Microsoft Corporation
  10. // 保留所有权利。
  11. #include "DlgService.h"
  12. #include <map>
  13. #pragma once
  14. class CDevicesBar : public CMFCToolBar
  15. {
  16. public:
  17. virtual void OnUpdateCmdUI(CFrameWnd* /*pTarget*/, BOOL bDisableIfNoHndler)
  18. {
  19. CMFCToolBar::OnUpdateCmdUI((CFrameWnd*) GetOwner(), bDisableIfNoHndler);
  20. }
  21. virtual BOOL AllowShowOnList() const { return FALSE; }
  22. };
  23. class CDevicesWnd : public CDockablePane
  24. {
  25. // 构造
  26. public:
  27. CDevicesWnd() noexcept;
  28. void AdjustLayout();
  29. // 特性
  30. public:
  31. protected:
  32. CFont m_fntPropList;
  33. // 对话框;
  34. CDlgService m_dlgService;
  35. // 实现
  36. public:
  37. virtual ~CDevicesWnd();
  38. // 去掉关闭按钮;但组合多个pane时无效;
  39. virtual BOOL CanBeClosed() const { return FALSE; };
  40. // 禁止拖动Pane;
  41. virtual BOOL FloatPane(CRect rectFloat, AFX_DOCK_METHOD dockMethod = DM_UNKNOWN, bool bShow = true) { return FALSE; }
  42. // 禁用停靠,双击底部无效(不会停靠)
  43. //virtual BOOL CanFloat() const { return FALSE; };
  44. // 禁用大小;//崩溃;
  45. //virtual BOOL IsResizable() const {return FALSE;}
  46. protected:
  47. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  48. afx_msg void OnSize(UINT nType, int cx, int cy);
  49. afx_msg void OnExpandAllProperties();
  50. afx_msg void OnUpdateExpandAllProperties(CCmdUI* pCmdUI);
  51. afx_msg void OnSortProperties();
  52. afx_msg void OnUpdateSortProperties(CCmdUI* pCmdUI);
  53. afx_msg void OnProperties1();
  54. afx_msg void OnUpdateProperties1(CCmdUI* pCmdUI);
  55. afx_msg void OnProperties2();
  56. afx_msg void OnUpdateProperties2(CCmdUI* pCmdUI);
  57. afx_msg void OnSetFocus(CWnd* pOldWnd);
  58. afx_msg void OnSettingChange(UINT uFlags, LPCTSTR lpszSection);
  59. DECLARE_MESSAGE_MAP()
  60. void SetPropListFont();
  61. int m_nComboHeight;
  62. public:
  63. afx_msg void OnPaint();
  64. };