| |

VerySource

 Forgot password?
 Register
Search
View: 1962|Reply: 7

Can I get the control name or property in the application window written in PB?

[Copy link]

1

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-2-16 09:30:01
| Show all posts |Read mode
Application A that has been written with PB. When A program is running, can you get the focus control in the A window, such as a single-line editor, singlelineedit, to get the name of the control, such as SLE_1 or something. That is the compiled PB. Can an application obtain its runtime controls and properties?
Reply

Use magic Report

1

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-4-16 22:30:01
| Show all posts
It would be better if there were examples, thank you.
Reply

Use magic Report

1

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-4-19 12:15:02
| Show all posts
Or even if you ca n’t return the name of the control, even if you can return the symbols that the corresponding control can distinguish from each other. The main idea is that I want to write a plug-in-like program. According to the control name obtained by the current window (if feasible), call different characters Fill in the corresponding control. Suddenly again, if you can get the name of the control, what method should be used to assign characters to the control?
Reply

Use magic Report

1

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-4-19 13:15:01
| Show all posts
Go up, can you answer me if you understand me?
Reply

Use magic Report

0

Threads

21

Posts

18.00

Credits

Newbie

Rank: 1

Credits
18.00

 China

Post time: 2020-5-3 23:30:02
| Show all posts
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.
Reply

Use magic Report

1

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-6-16 20:45:01
| Show all posts
Upstairs is a master, Xie Yixian.
Reply

Use magic Report

1

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-6-17 12:15:01
| Show all posts
In fact, what I said should not be described by the external plug-in. Mainly because the interface design of a unit's collection system for input information is too poor (unreasonable, low efficiency). I want to replace the input interface by programming myself. That's all.
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-12 23:30:01
| Show all posts
It is better to modify the original system.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list