From 3463c77d73bca0a97c89e7a61da7a97ec2c23e6c Mon Sep 17 00:00:00 2001 From: darker <mr.darker@163.com> Date: 星期五, 17 一月 2025 11:12:32 +0800 Subject: [PATCH] 1.消除编译产生的警告 2.添加Rotate角度的旋转 3.提取绘画图像,并封装成函数 --- SourceCode/Bond/Servo/ServoDlg.h | 34 ++++++++++++++++++++++++++++++++++ 1 files changed, 34 insertions(+), 0 deletions(-) diff --git a/SourceCode/Bond/Servo/ServoDlg.h b/SourceCode/Bond/Servo/ServoDlg.h index 1353deb..c3842e6 100644 --- a/SourceCode/Bond/Servo/ServoDlg.h +++ b/SourceCode/Bond/Servo/ServoDlg.h @@ -4,6 +4,8 @@ #pragma once #include "ServoGraph.h" +#include "BlButton.h" +#include "LogDlg.h" // CServoDlg 对话框 @@ -12,6 +14,14 @@ // 构造 public: CServoDlg(CWnd* pParent = NULL); // 标准构造函数 + + +private: + void Resize(); + void UpdateLogBtn(); + void UpdateRobotPosition(float percentage); + void RotateRobot(float angleInDegrees); + // 对话框数据 #ifdef AFX_DESIGN_TIME @@ -22,12 +32,19 @@ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持 +private: + BOOL m_bIsRobotMoving; + BOOL m_bShowLogWnd; + CLogDlg* m_pLogDlg; + // 实现 protected: HICON m_hIcon; CServoGraph* m_pGraph; COLORREF m_crBkgnd; HBRUSH m_hbrBkgnd; + CBlButton m_btnLog; + // 生成的消息映射函数 virtual BOOL OnInitDialog(); @@ -40,4 +57,21 @@ afx_msg void OnBnClickedCancel(); afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); afx_msg void OnDestroy(); + afx_msg void OnBnClickedButtonLog(); + afx_msg void OnSize(UINT nType, int cx, int cy); + afx_msg void OnClose(); + afx_msg LRESULT OnLogDlgHide(WPARAM wParam, LPARAM lParam); + afx_msg void OnMoving(UINT fwSide, LPRECT pRect); + afx_msg void OnMove(int x, int y); + afx_msg void OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu); + afx_msg void OnMenuFileSettings(); + afx_msg void OnUpdateMenuFileSettings(CCmdUI* pCmdUI); + afx_msg void OnMenuFileSecsTest(); + afx_msg void OnUpdateMenuFileSecsTest(CCmdUI* pCmdUI); + afx_msg void OnMenuWndLog(); + afx_msg void OnUpdateMenuWndLog(CCmdUI* pCmdUI); + afx_msg void OnMenuFileExit(); + afx_msg void OnUpdateMenuFileExit(CCmdUI* pCmdUI); + afx_msg void OnMenuHelpAbout(); + afx_msg BOOL OnEraseBkgnd(CDC* pDC); }; -- Gitblit v1.9.3