have a look at my Sample how i place TEXTBOX and PANEL for Webview2
http://www.hmgforum.com/viewtopic.php?f ... 2&start=12
Moderator: Rathinagiri
have a look at my Sample how i place TEXTBOX and PANEL for Webview2
Code: Select all
HB_FUNC( NAVIGATE_WEBVIEW2 )
Code: Select all
HB_FUNC( GETSOURCE_WEBVIEW2 )
Code: Select all
*-----------------------------------------------------------------------------------------------------
@ 000 , nWWidth-20 BUTTON WhatsApp2 OF Win_1 CAPTION "↹" WIDTH 20 HEIGHT 30 FONT "Verdana" SIZE 16 ;
ACTION AbreCierra( "Win_2" ) TOOLTIP "Cierra/Abre Ventana de WHATSAPP" FLAT
DEFINE WINDOW Win_2 ROW 000 COL nWWidth-670 WIDTH 650 HEIGHT nWHeight-60 PANEL BACKCOLOR GRAY
INIT_WEBVIEW2( Win_2.Handle, "https://web.whatsapp.com/" )
END WINDOW
*-----------------------------------------------------------------------------------------------------
@ 025 , nWWidth-20 BUTTON WhatsApp3 OF Win_1 CAPTION "↹" WIDTH 20 HEIGHT 30 FONT "Verdana" SIZE 16 ;
ACTION AbreCierra( "Win_3" ) TOOLTIP "Cierra/Abre Ventana de FILETRANSFER" FLAT
DEFINE WINDOW Win_3 ROW 000 COL nWWidth-670 WIDTH 650 HEIGHT nWHeight-60 PANEL BACKCOLOR GRAY
INIT_WEBVIEW2( Win_3.Handle, "chrome-extension://kpadbdhpogbhpiklfcbdjdjgmehajcgf/index.html" )
END WINDOW
*-----------------------------------------------------------------------------------------------------
@ 050 , nWWidth-20 BUTTON WhatsApp4 OF Win_1 CAPTION "↹" WIDTH 20 HEIGHT 30 FONT "Verdana" SIZE 16 ;
ACTION AbreCierra( "Win_4" ) TOOLTIP "Cierra/Abre Ventana de HMGFORUM" FLAT
DEFINE WINDOW Win_4 ROW 000 COL nWWidth-670 WIDTH 650 HEIGHT nWHeight-60 PANEL BACKCOLOR GRAY
INIT_WEBVIEW2( Win_4.Handle, "http://www.hmgforum.com" )
END WINDOW
*-----------------------------------------------------------------------------------------------------
i recognize that EDGE Browse does same ... so it is normal.
Code: Select all
*.HBP
test_webview2.prg
HB_FUNC.PRG
Code: Select all
*.HBC
libpaths=.\WebView2\Win32
incpaths=.\WebView2\include
libs=WebView2Loader
can someone help me please ... what i´m doing wrongHarbour 3.2.0dev (r2011030937)
Copyright (c) 1999-2020, https://harbour.github.io/
In file included from C:\HMG.3.5\2\hmg_webview2\HB_FUNC.PRG:13:
C:/HMG.3.5/2/hmg_webview2/WebView2/include/WebView2.h:19: warning: ignoring #pragma warning [-Wunknown-pragmas]
19 | #pragma warning( disable: 4049 ) /* more than 64k source lines */
|
C:\HMG.3.5\2\hmg_webview2\HB_FUNC.PRG:14:10: fatal error: functional: No such file or directory
14 | #include <functional>
| ^~~~~~~~~~~~
compilation terminated.
hbmk2[HBWWB]: Error: Running C/C++ compiler. 1
gcc.exe -c -O3 -march=i586 -mtune=pentiumpro -fomit-frame-pointer -W -Wall -pipe -IC:/HMG.3.5/harbour/include -IC:/HMG.3.5/2/hmg_webview2 -IC:/HMG.3.5/include -IC:/HMG.3.5/2/hmg_webview2/WebView2/include R:/Temp/hbmk_rkjw3n.dir/test_webview2.c R:/Temp/hbmk_rkjw3n.dir/HB_FUNC.c R:/Temp/hbmk_r40kbw.c
https://docs.microsoft.com/en-us/micros ... zoomfactorput_ZoomFactor
Sets the ZoomFactor property.Code: Select all
public HRESULT put_ZoomFactor(double zoomFactor)
Code: Select all
HB_FUNC( NAVIGATE_WEBVIEW2 )
{
WCHAR * szURL = HMG_CHAR_TO_WCHAR( hb_parc( 1 ) );
if( isReady )
webview2->lpVtbl->Navigate( webview2, szURL );
}
is there a Trick "how" to simulate "click" so WebView2 have "Focus"
Code: Select all
Domethod( cForm, "setfocus" )
HwndWin := FindWindowEx( GetFormHandle( cForm ), 0, "Chrome_WidgetWin_0", 0 )
IF ! EMPTY(HwndWin)
MsgDebug(HwndWin0,"Chrome_WidgetWin_0")
HMG_Calldll( "User32.dll", , "setfocus", HwndWin ,0 )
nHwnd := FindWindowEx( HwndWin0, 0, "Chrome_WidgetWin_1", 0 )
IF ! EMPTY(nHwnd)
MsgDebug(nHwnd,"Chrome_WidgetWin_1")
HMG_Calldll( "User32.dll", , "setfocus", nHwnd ,0)
nRender := FindWindowEx( nHwnd, 0, "Chrome_RenderWidgetHostHWND", 0 )
IF ! EMPTY(nRender)
MsgDebug(nRender,"Chrome_RenderWidgetHostHWND")
HMG_Calldll( "User32.dll", , "setfocus", nRender ,0)