Cef4 will support FMX

Post Reply
Winexcel
Posts: 89
Joined: Thu Jul 13, 2017 11:37 am

Cef4 will support FMX

Post by Winexcel » Fri Feb 09, 2018 12:26 pm

Hello, I really admire you, salvador. I want to make a wrapper for FMX. My idea is very simplest how to do it. I will try to explain.
My idea is to create Object which won't paint the chromium window on some platform, FMX, VCL and so on...
This object just create chromium window as popup window which will be painted by Windows or another platform.

I rewrited ceffmx.pas unit from dcef3 2924, I used this feature there without any problems at all. I attached my unit with project which demonstrait my idea.

What would I like to make? I want to make the same Object, which will create chromium window as popup, without depends on any platforms.
I will be glad to see your suggests, advice, help.
Thank you very much!
You do not have the required permissions to view the files attached to this post.
Last edited by Winexcel on Fri Feb 09, 2018 12:53 pm, edited 1 time in total.

Winexcel
Posts: 89
Joined: Thu Jul 13, 2017 11:37 am

Re: Cef4 will support FMX

Post by Winexcel » Fri Feb 09, 2018 12:49 pm

My central idea is to overload method procedure TCustomChromiumFMX.CreateBrowser;. This method make a chromium window as popup window , It's 510 line in ceffmx.pas :

{$ifdef MSWINDOWS}
//info.windowless_rendering_enabled := Ord(True);
info.Style := WS_POPUP or WS_VISIBLE;// or WS_CLIPCHILDREN or WS_CLIPSIBLINGS or WS_TABSTOP;
info.x := 50;
info.y := 50;
info.Width := 500;
info.Height := 500;
info.parent_window := FmxHandleToHWND(GetMainContainer(Self).Handle);
{$endif}

After the window was created we can position it as we want. I wrote some solutions for this aims, I also can to share it with someone.
For example for Windows platform we can intercept a message "WM_MOVE", in intercept method we can position chromium window.
I don't know how it is realised in cef4 because I don't still learn this wrapper but I know how it is realised in dcef3.
We can position our window for help Browser.WindowHandle.
I want to listen to your opinion Salvador. Is it hard to make in cef4?

User avatar
salvadordf
Posts: 2495
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Cef4 will support FMX

Post by salvadordf » Fri Feb 09, 2018 1:01 pm

Thanks! :D

I'll take a look at your code as soon as I can.

User avatar
salvadordf
Posts: 2495
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Cef4 will support FMX

Post by salvadordf » Sat Feb 10, 2018 7:43 pm

Answered by email :)

Post Reply