Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Control-Names/Captions/Texts/Hints aus Fremdprogramm auslese (https://www.delphipraxis.net/69091-control-names-captions-texts-hints-aus-fremdprogramm-auslese.html)

Mackhack 10. Mai 2006 05:29


Control-Names/Captions/Texts/Hints aus Fremdprogramm auslese
 
Hallo,

ich muss ein Tool schreiben das mir aus einem fremden Programm die Namen, Caption/Text und Hints aus allen Controls ausliest. Ich habe mir gedacht ich hole mit FindWindow das Handle und pack alles in einen Record um es dann mit TStringList in eine File zu speichern.

So sieht mein record aus

Delphi-Quellcode:
type
  TOutTransRec = record
    FormClass: string;
    ObjClass: string;
    ObjectName: string;
    Caption: string;
    Hint: string;
  end;
Jedoch weis ich jetzt nicht wie ich mit einer Schleife an alles ran komme wie MainMenue, Buttons, Labels. Kann mir da bitte jemand n Denkanstoss geben oder so?

Vielen lieben Dank!

SirThornberry 10. Mai 2006 06:19

Re: Control-Names/Captions/Texts/Hints aus Fremdprogramm aus
 
An Labels wirst du nicht heran kommen. Ansonsten würde ich dir die Verwendung von EnumWindows empfehlen um alle Handle's zu bekommen. Diese Handles musst du dann natürlich noch aussortieren so das du nur die Handles deines bestimmtem Programmes hast.

Mackhack 11. Mai 2006 00:36

Re: Control-Names/Captions/Texts/Hints aus Fremdprogramm aus
 
Hi,

aber EnumWindows arbeitet doch mit allen TopLevel Windows. Ich will ja "nur" alle Controls von meinem Programm ermittelt haben.

Luckie 11. Mai 2006 07:00

Re: Control-Names/Captions/Texts/Hints aus Fremdprogramm aus
 
Dann nimm MSDN-Library durchsuchenEnumChildWindows.


Alle Zeitangaben in WEZ +1. Es ist jetzt 19:36 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz