|
-
December 26th, 2011, 11:42 AM
#1
WM_SETTEXT in Wind\ows 7
Trying to use
SendMessage(hwnd_child,WM_SETTEXT,0,(LPARAM)"Test");
It is finding the child fine, I can read text of off it till I'm blue in the face, but I can't seem to get SetText to work.
I've seen posts that say SETTEXT doesn't work between apps in Windows 7, even with elevated priveleges. Is there some other way to set text in a seperate app? It's a vb.net app, that I'm coding.
Sending Settext from a C++ non-visual app.
-
December 26th, 2011, 01:09 PM
#2
Re: WM_SETTEXT in Wind\ows 7
One immediate thought, WM_SETTEXT is UNICODE, you need to send a UNICODE string. Try:
SendMessage(hwnd_child,WM_SETTEXT,0,(LPARAM)L"Test");
If that doesn't work, post what you are getting for output.
-Erik
-
December 26th, 2011, 01:30 PM
#3
Re: WM_SETTEXT in Wind\ows 7
Yup, still not working.
lResult = SendMessage(hwnd_child,WM_SETTEXT,0,(LPARAM)L"Test");
Returns true, but nothing is changed in the receiving app.
-
December 26th, 2011, 01:51 PM
#4
Re: WM_SETTEXT in Wind\ows 7
SendMessageA works, it doesn't update graphically but it's a hidden window, reading the text off it displays the expected information.
=) thanks
-
December 26th, 2011, 02:34 PM
#5
Re: WM_SETTEXT in Wind\ows 7
Sounds like you are using MBCS code and UNICODE flags.
WM_SETTEXT also comes in rootbeer versions WM_SETTEXTA and WM_SETTEXTW.
Try specifying which one.
-Erik
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|