IE

Re: IE

Postby Antonio Linares » Thu May 26, 2022 12:07 pm

Please check if a log file is created and if yes, please post its contents here

thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: IE

Postby Natter » Thu May 26, 2022 12:28 pm

Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: IE

Postby Antonio Linares » Thu May 26, 2022 12:31 pm

Whats your code in line 41 ?

Called from WEBVIEW_CREATE(41) in webview.prg
Called from MAIN(11) in webview.prg
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: IE

Postby Natter » Thu May 26, 2022 12:37 pm

#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
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: IE

Postby Natter » Thu May 26, 2022 12:41 pm

line 41 - WebView_Run( hWebView )
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: IE

Postby Antonio Linares » Thu May 26, 2022 11:14 pm

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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: IE

Postby Natter » Fri May 27, 2022 7:14 am

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 ?
Last edited by Natter on Fri May 27, 2022 7:19 am, edited 1 time in total.
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: IE

Postby Antonio Linares » Fri May 27, 2022 7:16 am

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: IE

Postby Natter » Thu Jun 02, 2022 6:57 pm

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
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: IE

Postby Antonio Linares » Thu Jun 02, 2022 9:36 pm

What C compiler do you use ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: IE

Postby Natter » Fri Jun 03, 2022 4:08 am

BCC7
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: IE

Postby Antonio Linares » Sat Jun 04, 2022 6:46 am

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

Code: Select all  Expand view
// 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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: IE

Postby Natter » Sat Jun 04, 2022 8:27 am

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.
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: IE

Postby Antonio Linares » Sat Jun 04, 2022 9:36 am

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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: IE

Postby Antonio Linares » Sat Jun 04, 2022 9:38 am

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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], Rick Lipkin and 94 guests