Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

How use TChromium in no visual mode

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

Re: How use TChromium in no visual mode

Post by salvadordf »

Hi,

You can use a TChromium component in off-screen mode (OSR).

First of all, read this page :
https://www.briskbard.com/index.php?lang=en&pageid=cef

Open the SimpleOSRBrowser demo and test your scripts.

After that you can remove the Panel1 (TBufferPanel) and delete the following procedures :
  • All Panel1* event procedures and Panel1PaintParentBkg.
  • chrmosrPaint
  • chrmosrCursorChange
  • chrmosrPopupShow
  • chrmosrPopupSize
  • chrmosrTooltip
  • chrmosrBeforePopup
  • chrmosrIMECompositionRangeChanged
You will have to modify chrmosrGetViewRect, chrmosrGetScreenPoint and chrmosrGetScreenInfo to use an imaginary panel with your custom dimensions and coordinates.

As a consequence of all this you will be able to delete more controls and procedures.
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: How use TChromium in no visual mode

Post by salvadordf »

There is a ConsoleBrowser demo with an off-screen browser but I don't have much experience with console applications and I don't know if you can make it work without a form.

That demo uses the single threaded message loop mode and calls GlobalCEFApp.RunMessageLoop. This means that CEF controls the message loop.

Perhaps you can use a hidden window with that demo.
Post Reply