Print Page | Close Window

SHDocV as alternative instead of ChromiumFMX

Printed From: TMS Software
Category: FMX Components
Forum Name: FMX WebGMaps / WebOSMaps
Forum Discription:
URL: http://www.tmssoftware.com/site/forum/forum_posts.asp?TID=4831
Printed Date: 01 Apr 2020 at 12:21am


Topic: SHDocV as alternative instead of ChromiumFMX
Posted By: Hackbart Christian
Subject: SHDocV as alternative instead of ChromiumFMX
Date Posted: 09 Feb 2015 at 10:55am
Hi,

i patched the TTMSFMXWinWebOSMapsWebBrowser class in order to use either ChromiumFMX or the native TWebbrowser Component. The changes where luckily extremely minimalistic and it runs like charmé. Is it possible that these changes would went into the officicial build? I did not changed that much code. To be more specific i just added an additional ifdef to do so.

The only problem i figured out is that sometimes i receive jsevents like: 'jsevent://click:lat=48.864460749028986/#lng=2.341675540039007#x=0#y=0'
 which raises an exception caused by the "/"-character at the lat variable.

Christian



Replies:
Posted By: Pieter Scheldeman
Date Posted: 09 Feb 2015 at 11:03am
Do you get the exception when using ChromiumFMX or web using TWebBrowser? 


Posted By: Hackbart Christian
Date Posted: 09 Feb 2015 at 11:14am
This happens in TWebbrowser only. I filtered this by using a simple Stringreplacing. 
So far it works fine and you dont need the chromium overhead and runtimes at all.


Posted By: Pieter Scheldeman
Date Posted: 09 Feb 2015 at 11:33am
Hi, 

We will investigate here what is possible.

Kind Regards, 
Pieter


Posted By: Hackbart Christian
Date Posted: 09 Feb 2015 at 11:47am
Thanks, but it is not that important - unless you plan to offer the ability to use the IE Webbrowser as alternative to chrome. 

Christian


Posted By: Pieter Scheldeman
Date Posted: 09 Feb 2015 at 12:12pm
Well, we need to investigate multiple solutions, until we find a way to provide a webbrowser without the need for the user to take additional steps to make it work.

Thank you for your feedback.

Kind Regards, 
Pieter


Posted By: Hackbart Christian
Date Posted: 09 Feb 2015 at 1:36pm
Technically "all" you have to do create a IWebBrowser2 interface and create a instance via:

  CoCreateInstance(CLSID_InternetExplorer, nil, CLSCTX_INPROC_SERVER,
    IID_IWebBrowser2, FWebBrowser);

The tricky part is to handle the messages resp. the window. To keep it simple (for my needs) i just use the VCL TWebrowser instead. Not the best way, but its working :)

Regards
Christian


Posted By: Pieter Scheldeman
Date Posted: 09 Feb 2015 at 1:51pm
Thank you for the tip, we will investigate this here. It's still unclear how we can support VCL (Windows) in a package that targets multiple platforms.

Kind Regards, 
Pieter



Print Page | Close Window