Feature: add tooltips to the password input dialog
The passcode input dialog now explains every control the operator can use on hover, using the same MFC built-in tooltip mechanism as the generate-passcode dialog (EnableToolTips + OnToolHitTest + TTN_NEEDTEXT, with the max tip width applied when the tip is requested). The passcode tip carries the main point: the value must match the current serial and binding mode, and a passcode that was tampered with, cracked or forged is invalid. The OK tip says the authorization check verifies the passcode after saving rather than claiming the dialog checks it. The checksum tip reflects that V2 verifies the passcode signature while V1 checks the passcode itself, and the root-credential tip notes that clearing the box does not delete the stored credential. While here, the TTN_NEEDTEXT handlers keep idFrom in UINT_PTR: on x64 the old UINT intermediate could truncate a control HWND. The same fix is applied to the generate-passcode dialog. All 6 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
f22bd574ea
commit
2b26f22d27
5 files changed
+119
-3
No files matched your search
@@ -60,6 +60,12 @@ public:
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
|
||||
|
||||
// 控件悬浮提示(MFC 内建工具提示):OnToolHitTest 按控件矩形命中,
|
||||
// TTN_NEEDTEXT 按控件 ID 取多行文本。隐藏控件的提示自动跳过。
|
||||
virtual INT_PTR OnToolHitTest(CPoint point, TOOLINFO* pTI) const;
|
||||
BOOL OnToolTipNotify(UINT id, NMHDR* pNMHDR, LRESULT* pResult);
|
||||
std::map<UINT, CString> m_tips; // 控件 ID -> 提示文本
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
public:
|
||||
HICON m_hIcon;
|
||||
|
||||
Reference in new issue
Block a user