Closed itsho closed 4 years ago
Text label have setText method.
Yes, I've seen that, but my question is regarding a different process
Don't understand your intent. Describe what you want. Use a story describe it may be
I have two EXE files:
if app B wants to change the text in app A, naturally, it would use a WINAPI like SetWindowText
or WM_SETTEXT
but, it would only work if app A is written with a Windows GUI library like MFC or WinForms.
now, that app A is using guilib, the mentioned WINAPI no longer works since app A does not have Handles to the inner parts.
so my question is: is it possible to change any text in app A from app B like we use to do with the mentioned WINAPI? the common case that I'm referring to is translating a running application to a different language.
Thank you very much in advance!
You can use the WM_COPYDATA message or other custom IPC protocol. B send WM_COPYDATA message to A. payload describe target label control id and new message content.
A receive message and handle it.
Other solution Maybe: A create a Win32 label with specific id and hide it. filter message to set duilib control. B use SetWindowText with A hide label hwnd.
Thank you.
Although very helpful, communication between two apps is not working well for my case - translating a duilib app without changing the first app code.
is there anything else I can do?
thanks again!
you mean that A is duilib app, B is any other implement app. want change A's label and not modify A ?
yes. exactly. just like SetWindowText
is working for old apps without changing them.
Canโt do that. Duilib is handleless framework. Can not change it's own control behavior with Window Message.
If you must doing this. try to use windows process injection tech.
Hello.
First - this is an AMAZING project. kudus!. Second - Is there anything similar/equivalent to
SetWindowText
orWM_SETTEXT
that works on Applications created withduilib
?Thanks in advance! ๐
Apologies for not writing in Chinese...