Home > Back-end >  The VCL inheritance tree viewer
The VCL inheritance tree viewer

Time:11-11

Ooolinux
This guy problem much more special,,,

He have a problem, lead to the generation of the software,,



Link: https://pan.baidu.com/s/1dZJqoBq7qwzUD4olOTJjUg
The extracted code: 9 k6b

Currently only supports the native VCL type, who do not support third party controls, the reason is very simple, I am lazy,,,,,

Method of use: a class name in the text box input, such as TEdit, click on "show", from top to bottom on the right, according to the class derivation tree,,

CodePudding user response:

Quite good, actually Help but they also can see, didn't you this convenient, RTTI you use?

CodePudding user response:

Yes, RTTI, there is a problem, however, is actually can see any component, including native and third parties, but there is a problem that must be added in the Form corresponding to the header file and the corresponding Link,,, I don't know how to dynamically add

Third party controls, for example, FastReport, you must add as a FastReport controls to the form, and then form the header file will automatically add:
# include "frxClass. HPP
"Forms of CPP file will automatically add 1:
# pragma link "frxClass
"
Then you can see the:


But the program is running, how to add ah,,
To you, I am lazy,,,

CodePudding user response:

Delphi classes have ClassParent, ClassName method, so the column inheritance tree, it is very simple, runtime USES an unknown class, first RegisterClass/RegisterClasses

CodePudding user response:

refer to the second floor draculamx response:
yes, RTTI, there is a problem, however, is actually can see any component, including native and third parties, but there is a problem that must be added in the Form corresponding to the header file and the corresponding Link,,, I don't know how to dynamically add

Third party controls, for example, FastReport, you must add as a FastReport controls to the form, and then form the header file will automatically add:
# include "frxClass. HPP
"Forms of CPP file will automatically add 1:
# pragma link "frxClass
"
Then you can see the:
[img=https://img-bbs.csdn.net/upload/201907/28/1564295734_535924.

But the program is running, how to add ah,,
To you, I am lazy,,,


reference 3 floor early play play nuclear response:
Delphi classes have ClassParent, ClassName method, so the inheritance tree, it is very simple, the runtime USES an unknown class, must first RegisterClass/RegisterClasses


Try the old almost method,
In addition, you this interface is too wide,

CodePudding user response:

reference 3 floor early play play nuclear response:
Delphi classes have ClassParent, ClassName method, so the inheritance tree, it is very simple, the runtime USES an unknown class, must first RegisterClass/RegisterClasses


Not get, even the unknown class, if you at compile time, with no reference to be used in this header file, run time, also can't correct identification of the class,,

CodePudding user response:

I tried it once, do not need to be added in the CPP # pragma link "frxClass", just in a header file, refer to those who control the header file,

Then there is a very stupid, but very lazy way:
All the related control. H are written at the end of file, including third party

So you can see all of the controls of the inheritance tree

CodePudding user response:

It involves a problem, we in programming, to use a control, it is necessary to complete the following steps, refer to the control of the header files, # pragma link "XXXX", when we are on the form into a widget, this work is the IDE automatically,

Now to implement inheritance tree view of any control, there is a problem, inheritance tree code itself, just quoted the VCL basic controls, if you want to view the VCL extension controls, or third party controls, so at the time of writing inheritance tree, then give these controls header file reference in, or how to compile?

Or FastReport controls, for example, when I was writing code, without reference to any header files, the control program to run now, can be loaded at run time this control?? Seems to be no good,,,

CodePudding user response:

I said runtime USES an unknown class is like Delphi, CB IDE, is based on the package, the unknown class must first be compiled into BPL, at the time of initialization calling RegisterClass/RegisterClasses registered himself, and then use package program can FindClass from a string of class reference, but the premise is that the other party must first be compiled into the binary himself, still need to know the corresponding unit at compile time, so if you want to do a program, enter any class name, can display the corresponding information, it must be no good,

CodePudding user response:

refer to eight floor early play play nuclear response:
I said runtime USES an unknown class is like Delphi, CB IDE, is based on the package, the unknown class must first be compiled into BPL, at the time of initialization calling RegisterClass/RegisterClasses registered himself, and then use package program can FindClass class references from the string name, but only if the other party must first be compiled into the binary himself, still need to know the corresponding unit at compile time, so if you want to do a program, enter any class name, can display the corresponding information, it is certainly not

And I think, this is a paradox, to see whether the inheritance tree, or go directly to help document,,

Well were only a few lines of code, this thing wrong, well I'm lazy,,
  • Related