BCX_Browser (Control and Demo)

Started by MrBcx, January 11, 2020, 03:50:21 PM

Previous topic - Next topic

MrBcx

The attached zip contains my new BCX_BROWSER control in the form of an include file (Bcx_Browser.Bi)

Browser.bas is the demo that shows off everything that it can do.

This was tested with PellesC, Mingw, and LccWin32 -- it only compiled with Pelles C.

If you have a way to test with other compilers, please post your findings.   Thank you --

The attached zip contains:

Build.Bat
Bcx_Browser.Bi
Browser.Bas
Browser.C
Browser.Exe

MrBcx

#1
The attached zip contains updated files that I have successfully compiled
in 32 and 64 bit using MSVC, Mingw (g++), Clang, Pelles, and LccWin32.


The demo is the same as the original, more or less, but now includes a
button that calls the browser's Print Preview / Print / Setup dialog.

Microsoft has given assurances that shdocvw.dll, which is the underlying
technology that drives the Internet Explorer web browser, will not be going away
and that apps that rely on it will continue to operate as they always have. 


The zip file contains no executable.

MrBcx

#2
I added the new SUB DisplayHtmlString(hBrowser, MyHtml$) to the( BCX_Browser.bi ) library and a new example (below) demonstrating its use.

Basically, SUB DisplayHtmlString(hBrowser, MyHtml$) replaces whatever is in the browser window pointed to by hBrowser with the html codes contained in the MyHtml$ argument.  You can create the html on-the-fly, load it from a file or db, or pull it down from the web.  It's entirely up to you. 



GUI "BCX Browser Demo", PIXELS

$INCLUDE "BCX_Browser.bi"

SUB FORMLOAD
    LOCAL AS HWND Form       ' Main window
    LOCAL AS HWND hBrowser   ' Browser window
    LOCAL AS STRING MyHtml   ' Holds our html

    Form = BCX_FORM("BCX Browser", 0, 0, 400, 350, WS_CAPTION OR WS_SYSMENU OR WS_MINIMIZEBOX)
    hBrowser = BCX_BROWSER("", Form, 0, 10, 10, 325, 275)  ' BCX_BROWSER will now use a blank file when URL = ""

    MyHtml$ = "<!DOCTYPE html><head><style>.style1{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:24px;}"
    MyHtml$ = MyHtml$ + ".style2{color:#408080;font-weight:bold;}</style></head><body><center><span class='style1'>"
    MyHtml$ = MyHtml$ + "Hello <span class='style2'>BCX</span> World!</span></center></body></html>"

    DisplayHtmlString(hBrowser, MyHtml$)  ' Feed our new SUB

    CENTER(Form)
    SHOW(Form)
END SUB


BEGIN EVENTS
END EVENTS