1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-11-23 21:34:53 +02:00

Moved TChromium.InitializeDragAndDrop to TForm.OnShow in PopupBrowser

This commit is contained in:
Salvador Díaz Fau
2019-11-26 10:59:04 +01:00
parent c455886d29
commit 1d8773c42c
5 changed files with 65 additions and 46 deletions

View File

@@ -154,6 +154,13 @@ begin
GlobalCEFApp.EnableHighDPISupport := True;
//GlobalCEFApp.LogFile := 'debug.log';
//GlobalCEFApp.LogSeverity := LOGSEVERITY_INFO;
{
GlobalCEFApp.FrameworkDirPath := 'c:\cef';
GlobalCEFApp.ResourcesDirPath := 'c:\cef';
GlobalCEFApp.LocalesDirPath := 'c:\cef\locales';
GlobalCEFApp.cache := 'c:\cef\cache';
GlobalCEFApp.UserDataPath := 'c:\cef\User Data';
}
end;
procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
@@ -212,7 +219,7 @@ begin
PostMessage(Handle, CEF_AFTERCREATED, 0, 0);
end;
procedure TMainForm.Chromium1BeforePopup(Sender : TObject;
procedure TMainForm.Chromium1BeforePopup( Sender : TObject;
const browser : ICefBrowser;
const frame : ICefFrame;
const targetUrl : ustring;
@@ -342,11 +349,7 @@ begin
FCriticalSection.Acquire;
if (FChildForm <> nil) then
begin
//FChildForm.ApplyPopupFeatures;
//FChildForm.Show;
PostMessage(FChildForm.Handle, CEF_SHOWCHILD, 0, 0);
end;
PostMessage(FChildForm.Handle, CEF_SHOWCHILD, 0, 0);
FChildForm := TChildForm.Create(self);
finally