IE
- Antonio Linares
- Site Admin
- Posts: 42597
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 40 times
- Been thanked: 86 times
- Contact:
- Antonio Linares
- Site Admin
- Posts: 42597
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 40 times
- Been thanked: 86 times
- Contact:
Re: IE
Whats your code in line 41 ?
Called from WEBVIEW_CREATE(41) in webview.prg
Called from MAIN(11) in webview.prg
Called from WEBVIEW_CREATE(41) in webview.prg
Called from MAIN(11) in webview.prg
Re: IE
#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
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
- Antonio Linares
- Site Admin
- Posts: 42597
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 40 times
- Been thanked: 86 times
- Contact:
Re: IE
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
You are not using the right source code.
The example to test it is this one:
viewtopic.php?p=248148&sid=527fd8b7ebd2776b65ec419985ebf4da#p248148
- Antonio Linares
- Site Admin
- Posts: 42597
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 40 times
- Been thanked: 86 times
- Contact:
Re: IE
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
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
- Antonio Linares
- Site Admin
- Posts: 42597
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 40 times
- Been thanked: 86 times
- Contact:
- Antonio Linares
- Site Admin
- Posts: 42597
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 40 times
- Been thanked: 86 times
- Contact:
Re: IE
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
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
Code: Select all | Expand
// Please install https://developer.microsoft.com/en-us/m ... /webview2/ x86 version before using it
#include "FiveWin.ch"
function Main()
local oWebView := TWebView():New()
oWebView:Navigate( "http://www.google.com" )
oWebView:Run()
oWebView:Destroy()
return nil
Re: IE
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.

I got the impression that it is not possible to run more or less complex html files in webview2 - the webview2 window closes immediately.
- Antonio Linares
- Site Admin
- Posts: 42597
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 40 times
- Been thanked: 86 times
- Contact:
Re: IE
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
https://github.com/webview/webview/blob/master/webview.h
- Antonio Linares
- Site Admin
- Posts: 42597
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 40 times
- Been thanked: 86 times
- Contact:
Re: IE
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
> 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