RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Classes.ReadComponentRes Function

Reads components and their properties from a specified resource.

Pascal
function ReadComponentRes(const ResName: string; Instance: TComponent): TComponent;
C++
TComponent * ReadComponentRes(const AnsiString ResName, TComponent * Instance);

Classes

Call ReadComponentRes to create a component from its representation in a resource header. The ResName parameter is the name assigned to the resource for the component. The Instance parameter is an instance of the component that should be filled in with the attributes of the saved resource. Instance must be an object of the same class as the saved resource, or one of its descendants. Create an instance of the appropriate type of object, and then call ReadComponentRes to read in its property settings. If Instance is nil (Delphi) or NULL (C++), the object class is read from the resource. 

ReadComponentRes returns an instance of the component that was read from the resource. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!