Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我发现使用 nsDialogs 很容易将焦点设置到特定控件:
${NSD_SETFOCUS} $myHWnd
但是还有一种方法可以选择该控件中的所有文本,以便当用户开始输入时,已经存在的内容会被覆盖吗?
事实证明,使用标准 NSIS 函数也很容易SendMessage。您可以简单地发送带有 0 和 -1 作为参数的 EM_SETSEL 消息:
SendMessage
SendMessage $myHWnd ${EM_SETSEL} 0 -1
这将选择文本框中的所有文本。