From 5a66d26a2899a2450a50f00d09c728ae151715be Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期三, 23 七月 2025 11:19:42 +0800
Subject: [PATCH] Merge branch 'clh' into liuyang
---
SourceCode/Bond/Servo/CCustomCheckBox.h | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/SourceCode/Bond/Servo/CCustomCheckBox.h b/SourceCode/Bond/Servo/CCustomCheckBox.h
new file mode 100644
index 0000000..c7928f0
--- /dev/null
+++ b/SourceCode/Bond/Servo/CCustomCheckBox.h
@@ -0,0 +1,28 @@
+#pragma once
+
+
+#define WM_CHECKBOX_STATE_CHANGED WM_USER + 1003
+
+class CCustomCheckBox : public CButton
+{
+public:
+ CCustomCheckBox();
+ virtual ~CCustomCheckBox();
+
+public:
+ void SetBackgroundColor(COLORREF color);
+ void SetTextColor(COLORREF color);
+ void SetNotifyHwnd(HWND hWnd); // 设置消息接收窗口
+
+protected:
+ afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);
+ afx_msg void OnClicked();
+ DECLARE_MESSAGE_MAP()
+
+private:
+ COLORREF m_bgColor;
+ COLORREF m_textColor;
+ CBrush m_brush;
+ HWND m_hNotifyWnd;
+};
+
--
Gitblit v1.9.3