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.
我正在尝试使用 win32 将一些文本发送到输入框。一些文本出现在输入框中,但都是混乱的(?????????a??????)。
代码是:
SendMessage(myHandle, WM_SETTEXT, 1, "A")
我不知道这是否是根本原因,但只要目标窗口(在你的情况下是编辑框)在同一个进程中,你应该调用 SetWindowText() 而不是直接发送 WM_TEXT 。
高温下,
It should be something like this as mentioned below:-
SendMessage(myHandle,WM_SETTEXT,NULL,(LPARAM)L"A");