首次创建工程时,需要在工程文件里添加CEF启动代码
program Project1;
uses
Vcl.Forms,
WinApi.Windows,
uCEFApplication,
Unit1 in 'Unit1.pas' {Form1};
{$R *.res}
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
begin
GlobalCEFApp := TCefApplication.Create;
if GlobalCEFApp.StartMainProcess then
begin
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.CreateForm(TForm1, Form1);
Application.Run;
end;
GlobalCEFApp.Free;
end.