System.Classes.ReadComponentResFile

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function ReadComponentResFile(const FileName: string; const Instance: TComponent): TComponent;

C++

extern DELPHI_PACKAGE TComponent* __fastcall ReadComponentResFile(const System::UnicodeString FileName, TComponent* const Instance);

Properties

Type Visibility Source Unit Parent
function public
System.Classes.pas
System.Classes.hpp
System.Classes System.Classes

Description

Reads components and their properties from a specified Windows resource file.

Call ReadComponentResFile to create a component and its children from their representation in a Windowsresource file.

The FileName parameter is the name of the compiled resource file that contains the component resource.

The Instance parameter is an instance of the type of component that should be read. Create an instance of the appropriate type of object, and then call ReadComponentResFile to read in its property settings. If Instance is nil (Delphi) or NULL (C++), the object class is read from the resource. Before passing an Instance parameter of nil (Delphi) or NULL (C++), all classes being read must have been registered using the RegisterClass or RegisterClasses routine.

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

See Also

Code Examples