splashhtml

This commit is contained in:
2022-10-02 00:20:31 -04:00
parent 3bdef8e3ab
commit 9dc3577bc8
2 changed files with 25 additions and 1 deletions

View File

@@ -8,7 +8,28 @@
#include <shlwapi.h> #include <shlwapi.h>
int SplashHTMLLoad(std::string strHTML) int SplashHTMLLoad(std::string strHTML)
//void CreateHTMLContainer()
{ {
HWND NewWindow = CreateWindowEx(
WS_EX_TOOLWINDOW,
"",
"",
WS_OVERLAPPEDWINDOW|WS_VISIBLE,
0,
0,
500,
300,
0,
0,
HINSTANCE(NULL),
NULL);
ShowWindow(NewWindow, 1);
UpdateWindow(NewWindow);
return 0;
}
int SplashHTMLLoadz(std::string strHTML)
{
//CreateHTMLContainer();
printf("%s \n", strHTML.c_str()); printf("%s \n", strHTML.c_str());
CoInitialize(NULL); CoInitialize(NULL);
@@ -31,6 +52,9 @@ int SplashHTMLLoad(std::string strHTML)
BSTR URL = SysAllocString(L"about:blank"); BSTR URL = SysAllocString(L"about:blank");
browser->put_AddressBar(false); browser->put_AddressBar(false);
browser->put_ToolBar(false); browser->put_ToolBar(false);
browser->put_TheaterMode(false);
browser->put_Width(500);
browser->put_Height(300);
browser->Navigate(URL, &empty, &empty, &empty, &empty); browser->Navigate(URL, &empty, &empty, &empty, &empty);
SysFreeString(URL); SysFreeString(URL);

View File

@@ -1,2 +1,2 @@
#include <string> #include <string>
int SplashHTMLLoad(std::string); int SplashHTMLLoad(std::string);