RAD Studio VCL Reference
Classes.ReadComponentRes Function

Reads components and their properties from a specified resource.

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

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) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!