Page 2 of 3
Re: IE
Posted: Thu May 26, 2022 12:07 pm
by Antonio Linares
Please check if a log file is created and if yes, please post its contents here
thanks
Re: IE
Posted: Thu May 26, 2022 12:28 pm
by Natter
Re: IE
Posted: Thu May 26, 2022 12:31 pm
by Antonio Linares
Whats your code in line 41 ?
Called from WEBVIEW_CREATE(41) in webview.prg
Called from MAIN(11) in webview.prg
Re: IE
Posted: Thu May 26, 2022 12:37 pm
by Natter
#include "FiveWin.ch"
static hDLL
function Main()
local hWebView
hDLL = LoadLibrary( "webview.dll" )
hWebView = WebView_Create( 0, 0 )
* WebView_Navigate( hWebView, Html() ) // or use a URL like "https://www.fivetechsoft.com/test.html" )
WebView_Navigate( hWebView, "https://www.fivetechsoft.com" )
// WebView_Eval( hWebView, 'document.body.style.backgroundColor = "blue"' )
WebView_Bind( hWebView, "test", Test(), hWebView )
WebView_Run( hWebView )
WebView_Destroy( hWebView )
FreeLibrary( hDLL )
return nil
function Html()
local cHtml
TEXT INTO cHtml
data:text/html,
<html>
<head>
</head>
<body style="background-color:cyan">
<h2>Using WebView from FWH</h2>
<button onclick='test( 123, "Hello" )'>Call FWH app from web browser</button>
</body>
</html>
ENDTEXT
return cHtml
DLL FUNCTION WEBVIEW_CREATE( nDebug AS LONG, hWndParent AS LONG ) AS LONG PASCAL FROM "webview_create" LIB hDLL
DLL FUNCTION WEBVIEW_RUN( hWebView AS LONG ) AS VOID PASCAL FROM "webview_run" LIB hDLL
DLL FUNCTION WEBVIEW_NAVIGATE( hWebView AS LONG, cUrl AS LPSTR ) AS VOID PASCAL FROM "webview_navigate" LIB hDLL
DLL FUNCTION WEBVIEW_DESTROY( hWebView AS LONG ) AS VOID PASCAL FROM "webview_destroy" LIB hDLL
DLL FUNCTION WEBVIEW_BIND( hWebView AS LONG, cName AS LPSTR, pFunc AS LONG, pVoid AS LONG ) AS VOID PASCAL FROM "webview_bind" LIB hDLL
DLL FUNCTION WEBVIEW_EVAL( hWebView AS LONG, cJavaScript AS LPSTR ) AS VOID PASCAL FROM "webview_eval" LIB hDLL
#pragma BEGINDUMP
#include <hbapi.h>
#include <windows.h>
static void test( const char * x, const char * y) //, void * t )
{
MessageBox( 0, x, y, 0 );
}
HB_FUNC( TEST )
{
hb_retnl( ( HB_LONG ) test );
}
#pragma ENDDUMP
Re: IE
Posted: Thu May 26, 2022 12:41 pm
by Natter
line 41 - WebView_Run( hWebView )
Re: IE
Posted: Thu May 26, 2022 11:14 pm
by Antonio Linares
Dear Natter,
You are not using the right source code.
The example to test it is this one:
viewtopic.php?p=248148&sid=527fd8b7ebd2776b65ec419985ebf4da#p248148
Re: IE
Posted: Fri May 27, 2022 7:14 am
by Natter
Yes, Antonio, this example works. If it could be assembled under Xharbour it would be very convenient.
Where can I see the description of the functions from Webview.dll ?
Re: IE
Posted: Fri May 27, 2022 7:16 am
by Antonio Linares
Re: IE
Posted: Thu Jun 02, 2022 6:57 pm
by Natter
How do I open a WebView in my application window?
How do I upload an html file to WebView ?
Is it possible to get an example of using functions webView.dll :
webview_bind
webview_destroy
webview_dispatch
webview_eval
webview_get_window
webview_init
webview_return
webview_set_size
webview_set_title
webview_terminate
Re: IE
Posted: Thu Jun 02, 2022 9:36 pm
by Antonio Linares
What C compiler do you use ?
Re: IE
Posted: Fri Jun 03, 2022 4:08 am
by Natter
BCC7
Re: IE
Posted: Sat Jun 04, 2022 6:46 am
by Antonio Linares
Dear Yuri,
We have managed to create a new Class TWebView that uses the same source code with all C compilers (Borland, Microsoft, MinGW) and it works also with xHarbour !!!

It will be published in next FWH build
Re: IE
Posted: Sat Jun 04, 2022 8:27 am
by Natter
Thank you, Antonio! This is good news. However, on June 15, Microsoft promises to disable Internet Explorer.
I got the impression that it is not possible to run more or less complex html files in webview2 - the webview2 window closes immediately.
Re: IE
Posted: Sat Jun 04, 2022 9:36 am
by Antonio Linares
For detailed documentation about each method please review webview.dll docs (embedded into the header file):
https://github.com/webview/webview/blob/master/webview.h
Re: IE
Posted: Sat Jun 04, 2022 9:38 am
by Antonio Linares
Dear Yuri,
> I got the impression that it is not possible to run more or less complex html files in webview2 - the webview2 window closes immediately
We have been able to make Google maps work with it, so I would say there are no limits.
What HTML are you loading that is causing troubles ?
You may be doing it in a wrong way