RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TPicture.RegisterFileFormat Method

Registers a new TGraphic class for use in LoadFromFile.

Pascal
class procedure RegisterFileFormat(const AExtension: string; const ADescription: string; AGraphicClass: TGraphicClass);
C++
__fastcall RegisterFileFormat(const AnsiString AExtension, const AnsiString ADescription, TGraphicClass AGraphicClass);

Use RegisterFileFormat to register a graphic file format with TPicture so that it can be used with a Open or Save dialog box. 

The AExtension parameter specifies the three-character system file extension to associate with the graphic class (for example, "bmp" is associated with TBitmap). The ADescription parameter specifies the description of the graphic to appear in the drop down list of the dialog box (for example, "Bitmaps" is the description of TBitmap). The AGraphicClass parameter registers the new graphic class to associate with the file format. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!