2017-10-19 12:11:47 +02:00
|
|
|
program SimpleBrowser;
|
|
|
|
|
2023-11-27 18:21:07 +01:00
|
|
|
{$I ..\..\..\source\cef.inc}
|
2017-10-19 12:11:47 +02:00
|
|
|
|
|
|
|
uses
|
2019-05-19 16:08:15 +02:00
|
|
|
Forms, Interfaces,
|
2017-12-18 19:38:56 +01:00
|
|
|
Windows,
|
2017-10-19 12:11:47 +02:00
|
|
|
uCEFApplication,
|
2018-06-18 17:01:44 +02:00
|
|
|
uSimpleBrowser in 'uSimpleBrowser.pas' {Form1},
|
|
|
|
uCEFLoader in 'uCEFLoader.pas';
|
2017-10-19 12:11:47 +02:00
|
|
|
|
2019-05-19 16:08:15 +02:00
|
|
|
//{$R *.res}
|
2017-10-19 12:11:47 +02:00
|
|
|
|
|
|
|
// CEF3 needs to set the LARGEADDRESSAWARE flag which allows 32-bit processes to use up to 3GB of RAM.
|
|
|
|
// If you don't add this flag the rederer process will crash when you try to load large images.
|
2018-06-18 17:01:44 +02:00
|
|
|
// The IMAGE_FILE_LARGE_ADDRESS_AWARE constant is declared in WinApi.Windows. If you don't want to add
|
|
|
|
// WinApi.Windows to the 'uses' section in this file just replace the following line by
|
|
|
|
// {$SetPEFlags $20}
|
2017-10-19 12:11:47 +02:00
|
|
|
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
|
|
|
|
|
|
|
|
begin
|
2018-06-18 17:01:44 +02:00
|
|
|
// This demo has the GlobalCEFApp creation, initialization and destruction in uCEFLoader.pas
|
|
|
|
// Read the code comments in uCEFLoader.pas for more details.
|
2017-10-19 12:11:47 +02:00
|
|
|
|
2018-06-18 17:01:44 +02:00
|
|
|
Application.Initialize;
|
|
|
|
{$IFDEF DELPHI11_UP}
|
|
|
|
Application.MainFormOnTaskbar := True;
|
|
|
|
{$ENDIF}
|
|
|
|
Application.CreateForm(TForm1, Form1);
|
|
|
|
Application.Run;
|
2017-10-19 12:11:47 +02:00
|
|
|
end.
|