Feature: add tooltips to the build-server dialog
Every edit box, combo box, checkbox and the padding slider on the "build server" dialog now explains itself on hover, using the same MFC built-in tooltip mechanism as the settings dialog (EnableToolTips + OnToolHitTest + TTN_NEEDTEXT, with a max tip width so the explicit line breaks survive). The program-name tip leads with advice to pick a new name for every test: leaving the name and folder empty installs to the default location, and repeated installs on one machine collide with a leftover process or old file, which shows up as a client that never comes online. Two details: hidden controls are skipped for the rectangle hit test (the payload/download row is often hidden), and the runtime-created TLS anchor checkbox is lifted to the top of the z-order so the relay's child-window lookup finds it instead of the group box. The padding slider keeps its live size readout by formatting into a member string rather than the tooltip's 80-character buffer. All 18 texts are translated in the en_US, de_DE and zh_TW packs. Co-Authored-By: deepseek-flash
This commit is contained in:
1 parent
8a507f784f
commit
381a7f85a0
5 files changed
+192
-6
No files matched your search
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "Buffer.h"
|
||||
#include "LangManager.h"
|
||||
#include <map>
|
||||
|
||||
// 读取资源:优先从 res 目录读取外部文件,如果不存在则使用内嵌资源
|
||||
// resName: 外部文件名(如 "ghost_x64.exe"),为空时直接使用内嵌资源
|
||||
@@ -62,6 +63,11 @@ protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
|
||||
CString GetFilePath(CString type, CString filter, BOOL isOpen = TRUE);
|
||||
BOOL OnToolTipNotify(UINT id, NMHDR* pNMHDR, LRESULT* pResult);
|
||||
// 生成对话框各输入控件的悬浮提示(MFC 内建工具提示,与设置对话框一致):
|
||||
// OnToolHitTest 按控件矩形命中,TTN_NEEDTEXT 按控件 ID 提供多行文本。
|
||||
std::map<UINT, CString> m_tips; // 控件 ID -> 提示文本
|
||||
CString m_sliderTip; // 滑块提示(按当前位置动态生成)
|
||||
virtual INT_PTR OnToolHitTest(CPoint point, TOOLINFO* pTI) const;
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
public:
|
||||
|
||||
Reference in new issue
Block a user