1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-06-22 22:17:48 +02:00

Enable DPI aware setting in Lazarus demos for Windows

Cleanup some useless code in Lazarus demos for Windows
This commit is contained in:
Salvador Díaz Fau
2025-05-20 19:35:57 +02:00
parent 13ce632b49
commit f3ee45910e
228 changed files with 418 additions and 785 deletions

View File

@ -16,6 +16,9 @@
<UseAppBundle Value="False"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<XPManifest>
<DpiAware Value="True/PM_V2"/>
</XPManifest>
</General>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>

View File

@ -9,14 +9,8 @@ uses
uSimpleBrowser in 'uSimpleBrowser.pas' {Form1},
uCEFLoader in 'uCEFLoader.pas';
//{$R *.res}
// 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.
// 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}
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
// CEF needs to set the LARGEADDRESSAWARE ($20) flag which allows 32-bit processes to use up to 3GB of RAM.
{$IFDEF WIN32}{$SetPEFlags $20}{$ENDIF}
{$R *.res}
@ -25,9 +19,6 @@ begin
// Read the code comments in uCEFLoader.pas for more details.
Application.Initialize;
{$IFDEF DELPHI11_UP}
Application.MainFormOnTaskbar := True;
{$ENDIF}
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

View File

@ -8,9 +8,8 @@ uses
LCLIntf, LCLType, LMessages, Forms, Interfaces,
uCEFApplicationCore;
// CEF3 needs to set the LARGEADDRESSAWARE flag which allows 32-bit processes
// to use up to 3GB of RAM.
{$SetPEFlags $20}
// CEF needs to set the LARGEADDRESSAWARE ($20) flag which allows 32-bit processes to use up to 3GB of RAM.
{$IFDEF WIN32}{$SetPEFlags $20}{$ENDIF}
{$R *.res}

View File

@ -10,10 +10,11 @@ object Form1: TForm1
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Position = poScreenCenter
LCLVersion = '4.0.0.4'
OnCloseQuery = FormCloseQuery
OnCreate = FormCreate
OnShow = FormShow
Position = poScreenCenter
object ChromiumWindow1: TChromiumWindow
Left = 0
Height = 603

View File

@ -5,13 +5,8 @@ unit uSimpleBrowser;
interface
uses
{$IFDEF DELPHI16_UP}
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls,
{$ELSE}
Windows, Messages, SysUtils, Variants, Classes, Graphics,
Controls, Forms, Dialogs, StdCtrls, ExtCtrls,
{$ENDIF}
uCEFChromium, uCEFWindowParent, uCEFChromiumWindow, uCEFTypes, uCEFInterfaces,
uCEFWinControl;