Developpez.com - Rubrique PureBasic

Le Club des Développeurs et IT Pro

PureBasic 6.10 beta 6 est disponible sur votre compte

Le 2024-02-10 12:33:15, par comtois, Responsable Purebasic
2024-02-10: beta 6 is out ! Mostly a bug fix release, with some addition for the WebViewGadget() and WebGadget() on Windows
  • Added: #PB_WebView_ICoreController attribute support WebGaget() and WebViewGadget()
  • Added: All ICoreWebView2 interfaces and constants as residents, thanks to Justin (Windows)


A small example to get the interface on Windows for WebViewGadget()
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
OpenWindow(0, 100, 100, 400, 400, "Hello", #PB_Window_SystemMenu)

WebViewGadget(0, 0, 0, 400, 400, #PB_WebView_Debug)

; Get the ICoreController interface 
;
Controller.ICoreWebView2Controller = GetGadgetAttribute(0, #PB_WebView_ICoreController)

; Get the ICoreWebView2 interface 
;
Controller\get_CoreWebView2(@Core.ICoreWebView2)
Core\Navigate("https://www.purebasic.com")

DataSection
	IID_ICoreWebView2Controller2:
	Data.l $C979903E
	Data.w $D4CA, $4228
	Data.b $92, $EB, $47, $EE, $3F, $A9, $6E, $AB
EndDataSection

If Controller\QueryInterface(?IID_ICoreWebView2Controller2, @Controller2.ICoreWebView2Controller2) = #S_OK
  Debug "ICoreWebView2Controller2 found: " + Controller2
Else
  Debug "Can't query ICoreWebView2Controller2"
EndIf

Repeat 
  Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
Source de l'information
  Discussion forum
9 commentaires