Using WebView with Borland !!!

Re: Using WebView with Borland !!!

Postby hmpaquito » Thu Feb 03, 2022 10:34 am

Hola,

No funcionaba e instalé Evergreen Standalone Installer y ya funcionó.

Windows 10 x64

Salu2
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

Re: Using WebView with Borland !!!

Postby Antonio Linares » Thu Feb 03, 2022 10:35 am

Hakan,

Yes, it is possible to change position, size and title of the webview control

There are still a few wrappers to implement, if you need them, just let us know it
regards, saludos

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

Re: Using WebView with Borland !!!

Postby cmsoft » Thu Feb 03, 2022 10:38 am

Antonio:
A partir de que versión de Fivewin funciona?
Corrí el exe que pusiste en la descarga y me funcionó, pero compile el prg con buildh.bat y el exe me lo genera pero muestra la pantalla y se cierra.
User avatar
cmsoft
 
Posts: 1291
Joined: Wed Nov 16, 2005 9:14 pm
Location: Mercedes - Bs As. Argentina

Re: Using WebView with Borland !!!

Postby Antonio Linares » Thu Feb 03, 2022 10:40 am

César,

De momento tienes que construirlo con buildh32.bat usando Microsoft

Con Borland, como se explica al principio de estos mensajes, funciona usando la librería de importación, pero hay que depurarlo
regards, saludos

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

Re: Using WebView with Borland !!!

Postby Horizon » Thu Feb 03, 2022 11:38 am

Antonio Linares wrote:Hakan,

Yes, it is possible to change position, size and title of the webview control

There are still a few wrappers to implement, if you need them, just let us know it


Yes. I need them.
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: Using WebView with Borland !!!

Postby Antonio Linares » Thu Feb 03, 2022 1:12 pm

thanks to Cristobal:

Code: Select all  Expand view  RUN
DLL FUNCTION WEBVIEW_GET_WINDOW( hWebView AS LONG ) AS LONG PASCAL FROM "webview_get_window" LIB hDLL
// nHint
#define WEBVIEW_HINT_NONE  0   // Width and height are default size
#define WEBVIEW_HINT_MIN   1   // Width and height are minimum bounds
#define WEBVIEW_HINT_MAX   2   // Width and height are maximum bounds
#define WEBVIEW_HINT_FIXED 3   // Window size can not be changed by a user
DLL FUNCTION WEBVIEW_SET_SIZE( hWebView AS LONG, nWidth AS _INT, nHeight AS LONG, nHint AS LONG ) AS VOID PASCAL FROM "webview_set_size" LIB hDLL
DLL FUNCTION WEBVIEW_SET_TITLE( hWebView AS LONG, cTitle AS LPSTR ) AS VOID PASCAL FROM "webview_set_title" LIB hDLL
regards, saludos

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

Re: Using WebView with Borland !!!

Postby cnavarro » Thu Feb 03, 2022 1:25 pm

leandro wrote:
* Se puede incrustar dentro de cualquier control?



Code: Select all  Expand view  RUN


//----------------------------------------------------------------------------//

function CreateWebView( oP )

   local cRet        := ""
   local n
   local hWndWebView
   local nStyle

   hWebView := WebView_Create( 0, 0 )

   WebView_Navigate( hWebView, "about:blank" )
   hWndWebView     := WebView_Get_Window( hWebView )
   nStyle          := GetWindowLong( hWndWebView, GWL_STYLE )
   nStyle          -= WS_CAPTION
   nStyle          -= WS_SYSMENU
   nStyle          += WS_THICKFRAME
   SetWindowLong( hWndWebView, GWL_STYLE, nStyle )
   SetWindowPos( hWndWebView, nil, 1, 1, oP:nWidth  - 2, oP:nHeight - 2, 0 )
   SetParent( hWndWebView, oP:hWnd )

   WebView_Bind( hWebView, "SendToFWH", SendToFWHAddress(), hWebView )
   WebView_Run( hWebView )
   EndWebView()

Return nil

//----------------------------------------------------------------------------//

Function EndWebView()

   WebView_Destroy( hWebView )
   FreeLibrary( hDLL )

return nil

//----------------------------------------------------------------------------//
 
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Using WebView with Borland !!!

Postby leandro » Thu Feb 03, 2022 9:32 pm

Buenas tardes para todos

Intente compilar, pero me sale el siguiente error:

Code: Select all  Expand view  RUN

┌────────────────────────────────────────────────────────────────────────────┐
│ FiveWin for Harbour 19.09 (MSVC++) Sep. 2019     Harbour development power │▄
(c) FiveTech 1993-2019 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8/10 │█
└────────────────────────────────────────────────────────────────────────────┘█
  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.11.3
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x86'
Compiling...
Harbour 3.2.0dev (r2008190002)
Copyright (c) 1999-2020, https://harbour.github.io/
Compiling 'webview.prg' and generating preprocessed output to 'webview.ppo'...
Lines 4984, Functions/Procedures 8
Generating C source output to 'webview.c'... Done.
Compilador de optimización de C/C++ de Microsoft (R) versión 19.29.30133 para x86
(C) Microsoft Corporation. Todos los derechos reservados.

webview.c
LINK : fatal error LNK1181: no se puede abrir el archivo de entrada '.\..\lib\hbhpdf32.lib'
* Linking errors *

C:\fwh1909\samples>

 
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1676
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: Using WebView with Borland !!!

Postby cnavarro » Thu Feb 03, 2022 10:22 pm

Quitala o coméntala del .bat o script que estés usando y prueba
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Using WebView with Borland !!!

Postby leandro » Fri Feb 04, 2022 12:57 am

ahora me devuelve este error

Code: Select all  Expand view  RUN

┌────────────────────────────────────────────────────────────────────────────┐
?FiveWin for Harbour 19.09 (MSVC++) Sep. 2019     Harbour development power │▄
?(c) FiveTech 1993-2019 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8/10 │█
└────────────────────────────────────────────────────────────────────────────┘?
  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀?
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.11.3
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
La línea escrita es demasiado larga.
La sintaxis del comando no es correcta.
C:\fwh1909\samples>
 
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1676
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: Using WebView with Borland !!!

Postby Antonio Linares » Fri Feb 04, 2022 9:36 am

Leandro,

Cuando sucede eso, cierra la ventana cmd y vuelve a abrir un nuevo cmd
regards, saludos

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

Re: Using WebView with Borland !!!

Postby leandro » Fri Feb 04, 2022 3:34 pm

Listo super, ya logre hacer la compilación

Image
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1676
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: Using WebView with Borland !!!

Postby Antonio Linares » Fri Feb 04, 2022 7:55 pm

Por lo visto para Windows 10 hace falta instalar algo que en Windows 11 parece no ser necesario...

Paco, aparte del instalador de EverGreen, te suena haber instalado algo más para probarlo ?
regards, saludos

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

Re: Using WebView with Borland !!!

Postby acuellar » Fri Feb 04, 2022 10:27 pm

Estimados

Con Windows 11 sólo instalé: MicrosoftEdgeWebView2RuntimeInstallerX86

Y funciona perfecto.
Saludos,

Adhemar C.
User avatar
acuellar
 
Posts: 1644
Joined: Tue Oct 28, 2008 6:26 pm
Location: Santa Cruz-Bolivia

Re: Using WebView with Borland !!!

Postby anserkk » Mon Feb 14, 2022 10:57 am

Hi,

I am trying to test WebView2 using Borland via Static linking of the DLL's.

I understand that the samples used in this thread are for Microsoft compiler. I believe that many here are still using Borland C more than Microsoft C compiler.

Found the following C functions in the sample posted on the first page of this thread. Are there more such C functions available to test Webview2 using BORLAND C compiler.

Code: Select all  Expand view  RUN
#pragma BEGINDUMP

#include <hbapi.h>

void * webview_create(int debug, void * window );
void webview_run( void * w );
void webview_navigate( void * w, const char * url );

HB_FUNC( WEBVIEW_CREATE )
{
   hb_retptr( webview_create( 0, NULL ) );
}

HB_FUNC( WEBVIEW_RUN )
{
   webview_run( hb_parptr( 1 ) );
}

HB_FUNC( WEBVIEW_NAVIGATE )
{
   webview_navigate( hb_parptr( 1 ), hb_parc( 2 ) );
}

#pragma ENDDUMP
User avatar
anserkk
 
Posts: 1333
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 94 guests

cron