feature: Support drawing board to add text

This commit is contained in:
yuanyuanxiang
2025-07-06 04:04:54 +08:00
parent 65cb4b23d5
commit 06d63dd990
5 changed files with 138 additions and 4 deletions

View File

@@ -24,6 +24,7 @@ public:
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnWindowPosChanged(WINDOWPOS* lpwndpos);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
protected:
virtual void DoDataExchange(CDataExchange* pDX);
@@ -32,6 +33,10 @@ protected:
DECLARE_MESSAGE_MAP()
BOOL PreTranslateMessage(MSG* pMsg);
void SendTextsToRemote(const CPoint& pt, const CString& inputText);
private:
bool m_bTopMost; // 置顶
bool m_bTransport; // 半透明
@@ -40,6 +45,11 @@ private:
bool m_bDrawing; // 是否正在绘图
std::vector<CPoint> m_currentPath; // 当前路径点
std::vector<std::vector<CPoint>> m_paths; // 所有路径
CPoint m_RightClickPos; // 右键点击位置
CEdit* m_pInputEdit = nullptr; // 类成员变量
std::vector<std::pair<CPoint, CString>> m_Texts;
CFont m_font; // 添加字体成员
CPen m_pen; // 画笔
public:
afx_msg void OnDrawingTopmost();
afx_msg void OnDrawingTransport();
@@ -47,4 +57,5 @@ public:
afx_msg void OnDrawingSize();
virtual BOOL OnInitDialog();
afx_msg void OnDrawingClear();
afx_msg void OnDrawingText();
};