ObjReader Community
SDK programming => Canary Bay => Topic started by: Patrice Terrier on June 23, 2020, 08:24:47 pm
-
webview2 (https://docs.microsoft.com/en-us/microsoft-edge/webview2/)
This project requires installing
1 - Microsoft Edge Canary (download (https://www.microsoftedgeinsider.com/fr-fr/download))
2 - (Optional Microsoft FREE Visual Studio 2019 Community(download (https://visualstudio.microsoft.com/en/vs/community/?rr=https%3A%2F%2Fwww.google.com%2F)))
3 - (Optional WebView2Browser (download (https://github.com/MicrosoftEdge/WebView2Browser)))
Useful links:
https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/0-9-488-reference-webview2
https://github.com/MicrosoftEdge/WebView2Samples/tree/master/WebView2APISample
These WinDev projects are modelled onto the C++ Version.
It does use exactly the same engine than the C++ version, aka WV2B.exe
This is the same binary that can be run as a standalone or encapsulated under control of the WinDev application.
This is a very powerful concept, because the embedded application is a native binary running much faster than any dot.NET IL or p-code.
Giving the illusion that it is a plain WinDev project, while obviously it isn't. ;)
You can even use a Skin of your own, to match the look of your product line...
Using this technology, it would be even possible to embed a 64-bit binary inside of a 32-bit application, go figure!
(http://www.objreader.com/download/images/WV2B.jpg)
-
Je viens de tester cette version sous Windev25 et c'est fonctionnel, encore merci pour les évolutions.
On peut skinner le navigateur comme on le souhaite, du coup nous pouvons avoir un navigateur qui nous ressemble...
-
New version 1.06 has been attached to the first post of this thread.
- Bug fix: the scrolling arrows were not always shown correctly.
- New: The SETBIN onTABclose property allows you to display a random wallpaper when closing the last TAB.
-
The WD17+ version is attached to the first post of this thread.
This version uses "ChampClone" rather than "ControlCreate" (that was made available only in version 19).
For WD17+, i am providing direct support of the GDIPLUS flat API, needed to create the images used by the short cut buttons (cf: LoadURL).
If you download and use this project, don't forget to make a small donation to support my work.
-
The WD17+ version 1.08 is attached to the first post of this thread. (WV2B_17_(1_08).zip)
What is new:
The ProcessBrowerMessage procedure (WM_SETTEXT message) is used to find out the content of the navigation control when a new URL is entered by the user.
PROCEDURE ProcessBrowserMessage(uMsg is unsigned int, wParam is unsigned int, lParam is system int)
// Beta version 1.03
IF wParam = WM_NCDESTROY THEN // Last Browser TAB is closing
IF gP.hRgn THEN
DeleteObject(gP.hRgn); gP.hRgn = 0
SetWindowRgn(gP.hMain, gP.hRgn, False)
IF BTN_Undock..Visible THEN
Browser_Template..Y += gP.dock_offset // Beta version 1.03
Browser_Template..Height -= gP.dock_offset // Beta version 1.03
END//else
BTN_Undock..Visible = False
BTN_Dock..Visible = True
WindowRedraw(gP.hMain)
END
ELSE IF wParam = WM_SETTEXT THEN // version 1.08
FILE_MAP_ALL_ACCESS is system int = 0x000F0000 | 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010
hMapFile is system int = API(KERNEL32, "OpenFileMappingA", FILE_MAP_ALL_ACCESS, False, "WV2B_MF")
IF (hMapFile) THEN
BUF_SIZE is int = MAX_PATH * 2
pBuf is system int = API(KERNEL32, "MapViewOfFile", hMapFile, FILE_MAP_ALL_ACCESS, 0, 0, BUF_SIZE)
IF (pBuf) THEN
Trace(StringRetrieve(pBuf, srUNICODEAddress))
// Pour refuser l'URL (contrôle parental par exemple)
// utiliser MG_CANCEL ci_dessous
//SendMessageA(gP.hBrowser, gP.Msg, MG_CANCEL, 0)
API(KERNEL32, "UnmapViewOfFile", pBuf)
END
API(KERNEL32, "CloseHandle", hMapFile)
END
END
uMsg = uMsg; wParam = wParam; lParam = lParam
If you download this update, don't forget that even a small donation encourages me to maintain and develop this project.
Le fichier WV2B_17_(1_08).zip correspondant à la version 1.08 est attaché au premier post de ce fil de discussion.
Ce qui est nouveau:
La procédure ProcessBrowerMessage (message WM_SETTEXT) permet de connaître le contenu du champ navigation lorsqu'une nouvelle URL est saisie par l'utilisateur.
Si vous téléchargez cette mise à jour, n'oubliez pas qu'une donation même minime m'encourage à maintenir et faire évoluer ce projet.
-
hi patrice
I just tested this version it's functional and super fast, I have a question how to use the proxy and disable webrtc leak !?
-
I am sorry, but i have never used a proxy myself.
To avoid webrtc leak, I am using ExpressVPN.
The code is super fast, because it is a native C++ 64-bit compiled application. The WinDev code is just a container, using sendmessage to perform inter-process communication with the WV2B.exe.
WV2B.exe is able to work as a standalone, or under control of another application.
Start WV2B.exe directly, to understand what i mean, then you will see the application skinned with my WinLIFT engine, rather than using the WinDev GUI.