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:D
Thanks
Printable View
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:D
Thanks
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.
Are you talking about a VB-created application? C++? or Delphi?
I think it's either a VB-created application or c++, not delphi:)
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 :p
Thanks:D
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.
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.Code:hwndParent = FindWindowEx(0, 0, "ClassName", "WindowName")
hwndLabel = FindWindowEx(hwndParent, 0, "Static", "Text of label")
SendMessage hwndLabel, WM_SETTEXT, 0, ByVal "My new Text"
thanks megatron:D