开发者

Send Text to an inputbox using win32 api

I'm trying开发者_运维问答 to send some text to an inputput box using win32. Some text appears in the inputbox, but it is all jumbled (?????????a??????).

The code is :

SendMessage(myHandle, WM_SETTEXT, 1, "A")


I don't know if this is the root cause, but as long as the target window (edit box in your case) is in the same process, you should call SetWindowText() rather than sending WM_TEXT directly.

HTH,


It should be something like this as mentioned below:-

SendMessage(myHandle,WM_SETTEXT,NULL,(LPARAM)L"A");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜