|
-
Aug 29th, 2001, 08:00 AM
#1
Thread Starter
Fanatic Member
How to change a label in another exe
Hiya'll
How can I change a label in another program?
I've tried WM_SETTEXT but I couldn't get it to change the label?
If anyone knows how to do that please respond
Thanks
-
Aug 29th, 2001, 08:01 AM
#2
PowerPoster
as far as I know, they can't be changed because they don't have a window handle. Windows draws them directly without using the Edit class to help save resources.
-
Aug 29th, 2001, 09:08 AM
#3
Are you talking about a VB-created application? C++? or Delphi?
-
Aug 29th, 2001, 09:12 AM
#4
Thread Starter
Fanatic Member
I think it's either a VB-created application or c++, not delphi
-
Aug 31st, 2001, 12:38 PM
#5
Thread Starter
Fanatic Member
Ok.....
Can maybe then someone tell me how to READ the caption/text of another program? I know for sure this can be done
but I just don't know how
Thanks
-
Aug 31st, 2001, 01:26 PM
#6
The debate is not whether you can read or write, rather it's whether it's a C++ or a VB app.
If it's a C++ App, then you could use this.
Code:
hwndParent = FindWindowEx(0, 0, "ClassName", "WindowName")
hwndLabel = FindWindowEx(hwndParent, 0, "Static", "Text of label")
SendMessage hwndLabel, WM_SETTEXT, 0, ByVal "My new Text"
If it's a VB App, then you can't do it, because as Chrisjk explained, they are drawn on to the parent's DC.
-
Aug 31st, 2001, 01:30 PM
#7
Thread Starter
Fanatic Member
thanks megatron
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
|