|
Your windows foundation is too bad, let me briefly tell you,
The name of the control only exists when you design it,
The window operating system distinguishes controls by relying on handles,
When the A program is running, can the focus control be obtained according to the A window
The answer is yes, there is a system function called getfocus to get the handle of the currently focused control,
This handle is different each time it is run, so you ca n’t write hard,
However, when sle emuc from the window where he is, if the program is fixed,
The general order is also fixed, so general plug-ins use the emucchildwindow API,
But pb does not support callbacks, so findwindowex is generally used as a compromise,
After you get the handle of the control, you can also get his text through the api,
But you must first share an input buffer with the program,
This requires the AttachThreadInput api,
Or you use the most common message mechanism in windows,
The text can also be obtained through the cut version,
In short, what you lack is not pb knowledge, but the foundation of a lot of windows ...
ps: If the a program is also written by you, then use dde, that is the proper method. |
|