From 0393d1ff2ebc378b3c4cff9b45f72ebc8a4ea516 Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期二, 03 六月 2025 15:13:42 +0800
Subject: [PATCH] Merge branch 'master' into liuyang
---
SourceCode/Bond/Servo/TopToolbar.h | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 58 insertions(+), 0 deletions(-)
diff --git a/SourceCode/Bond/Servo/TopToolbar.h b/SourceCode/Bond/Servo/TopToolbar.h
new file mode 100644
index 0000000..b65ad85
--- /dev/null
+++ b/SourceCode/Bond/Servo/TopToolbar.h
@@ -0,0 +1,58 @@
+#pragma once
+#include "BlButton.h"
+
+
+#define ID_MSG_TOOLBAR_BTN_CLICKED WM_USER + 20368
+
+// CTopToolbar 对话框
+
+class CTopToolbar : public CDialogEx
+{
+ DECLARE_DYNAMIC(CTopToolbar)
+
+public:
+ CTopToolbar(CWnd* pParent = NULL); // 标准构造函数
+ virtual ~CTopToolbar();
+
+
+public:
+ CWnd* GetBtn(UINT nId);
+ void SetOperatorBtnText(const char* pszText);
+ HMENU GetOperatorMenu();
+
+private:
+ void Resize();
+ void InitBtn(CBlButton& btn, const char* pszIcon1, const char* pszIcon2);
+
+private:
+ COLORREF m_crBkgnd;
+ HBRUSH m_hbrBkgnd;
+
+
+private:
+ CBlButton m_btnRun;
+ CBlButton m_btnStop;
+ CBlButton m_btnAlarm;
+ CBlButton m_btnSettings;
+ CBlButton m_btnRobot;
+ CBlButton m_btnOperator;
+
+
+// 对话框数据
+#ifdef AFX_DESIGN_TIME
+ enum { IDD = IDD_TOP_TOOLBAR };
+#endif
+
+protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
+
+ DECLARE_MESSAGE_MAP()
+public:
+ virtual BOOL OnInitDialog();
+ afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
+ afx_msg void OnDestroy();
+ afx_msg void OnSize(UINT nType, int cx, int cy);
+ virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
+ afx_msg void OnButtonOperatorMenuClicked(NMHDR* pNMHDR, LRESULT* pResult);
+ virtual BOOL PreTranslateMessage(MSG* pMsg);
+};
--
Gitblit v1.9.3