Placeholder
This commit is contained in:
@@ -7,27 +7,47 @@
|
|||||||
#include <ExDispid.h>
|
#include <ExDispid.h>
|
||||||
#include <shlwapi.h>
|
#include <shlwapi.h>
|
||||||
|
|
||||||
int SplashHTMLLoad(std::string strHTML)
|
void SplashHTMLContainer()
|
||||||
//void CreateHTMLContainer()
|
|
||||||
{
|
{
|
||||||
HWND NewWindow = CreateWindowEx(
|
HWND invisWindowHandle = CreateWindowEx(WS_EX_TOOLWINDOW,
|
||||||
WS_EX_TOOLWINDOW,
|
"htmlWindow",
|
||||||
"",
|
"Splash",
|
||||||
"",
|
WS_OVERLAPPEDWINDOW & ~WS_MAXIMIZEBOX & ~WS_THICKFRAME,
|
||||||
WS_OVERLAPPEDWINDOW|WS_VISIBLE,
|
200,
|
||||||
0,
|
200,
|
||||||
0,
|
500,
|
||||||
500,
|
300,
|
||||||
300,
|
NULL,
|
||||||
0,
|
NULL,
|
||||||
0,
|
NULL,
|
||||||
HINSTANCE(NULL),
|
NULL);
|
||||||
NULL);
|
printf("Creating Window HWND: %u\n", invisWindowHandle);
|
||||||
ShowWindow(NewWindow, 1);
|
ShowWindow(invisWindowHandle, 1);
|
||||||
UpdateWindow(NewWindow);
|
UpdateWindow(invisWindowHandle);
|
||||||
|
}
|
||||||
|
int SplashHTMLLoad(std::string strHTML)
|
||||||
|
{
|
||||||
|
IHTMLDocument2 *document = new IHTMLDocument2{}; // Declared earlier in the code
|
||||||
|
BSTR bstr = SysAllocString(OLESTR("Written by IHTMLDocument2::write()."));
|
||||||
|
// Creates a new one-dimensional array
|
||||||
|
SAFEARRAY *psaStrings = SafeArrayCreateVector(VT_VARIANT, 0, 1);
|
||||||
|
if (psaStrings == NULL) {
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
VARIANT *param;
|
||||||
|
HRESULT hr = SafeArrayAccessData(psaStrings, (LPVOID*)¶m);
|
||||||
|
param->vt = VT_BSTR;
|
||||||
|
param->bstrVal = bstr;
|
||||||
|
hr = SafeArrayUnaccessData(psaStrings);
|
||||||
|
hr = document->write(psaStrings);
|
||||||
|
cleanup:
|
||||||
|
// SafeArrayDestroy calls SysFreeString for each BSTR
|
||||||
|
if (psaStrings != NULL) {
|
||||||
|
SafeArrayDestroy(psaStrings);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
int SplashHTMLLoadz(std::string strHTML)
|
int PLACEHOLDER(std::wstring strHTML)
|
||||||
{
|
{
|
||||||
//CreateHTMLContainer();
|
//CreateHTMLContainer();
|
||||||
printf("%s \n", strHTML.c_str());
|
printf("%s \n", strHTML.c_str());
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
int SplashHTMLLoad(std::string);
|
//int SplashHTMLLoad(std::string strHTML);
|
||||||
|
int SplashHTMLLoad(std::string strHTML);
|
||||||
@@ -20,6 +20,11 @@ DISPPARAMS dispparamsNoArgs = {NULL, NULL, 0, 0};
|
|||||||
EXCEPINFO excepinfo;
|
EXCEPINFO excepinfo;
|
||||||
UINT nArgErr;
|
UINT nArgErr;
|
||||||
|
|
||||||
|
LRESULT CALLBACK HtmlProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
return DefWindowProc(hwnd, msg, wParam, lParam);
|
||||||
|
}
|
||||||
|
|
||||||
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
Application *app = (Application *)GetWindowLongPtr(hwnd, GWL_USERDATA);
|
Application *app = (Application *)GetWindowLongPtr(hwnd, GWL_USERDATA);
|
||||||
@@ -184,6 +189,8 @@ int main(int argc, char** argv) {
|
|||||||
settings.window.center = true; */
|
settings.window.center = true; */
|
||||||
HMODULE hThisInstance = GetModuleHandle(NULL);
|
HMODULE hThisInstance = GetModuleHandle(NULL);
|
||||||
|
|
||||||
|
if (!createWindowClass("htmlWindow",HtmlProc,NULL))
|
||||||
|
return false;
|
||||||
if (!createWindowClass("mainHWND",WndProc,hThisInstance))
|
if (!createWindowClass("mainHWND",WndProc,hThisInstance))
|
||||||
return false;
|
return false;
|
||||||
if (!createWindowClass("toolboxHWND",ToolboxProc,hThisInstance))
|
if (!createWindowClass("toolboxHWND",ToolboxProc,hThisInstance))
|
||||||
|
|||||||
Reference in New Issue
Block a user