Vcl.OleCtnrs.TOleContainer.CreateObjectFromInfo
Delphi
procedure CreateObjectFromInfo(const CreateInfo: TCreateInfo);
C++
void __fastcall CreateObjectFromInfo(const TCreateInfo &CreateInfo);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | Vcl.OleCtnrs.pas Vcl.OleCtnrs.hpp |
Vcl.OleCtnrs | TOleContainer |
Description
Creates an OLE object matching the specified TCreateInfo record.
Call CreateObjectFromInfo to create a linked or embedded OLE object based on the specifications in the CreateInfo parameter. CreateInfo specifies whether the object should be created from a file, from a data transfer object, or from a class identifier, and provides the necessary supporting information. CreateInfo also indicates whether the OLE object should be displayed as an Icon, and allows the icon to be specified. If there's already an OLE object in the container, it is destroyed and any changes the user made to it are discarded.
Note: The CreateLinkToFile, CreateObject, and CreateObjectFromFile methods are one-line calls for the most common types of OLE objects. They can be used instead of filling out the TCreateInfo record.