Placeholder
This commit is contained in:
@@ -7,27 +7,47 @@
|
||||
#include <ExDispid.h>
|
||||
#include <shlwapi.h>
|
||||
|
||||
int SplashHTMLLoad(std::string strHTML)
|
||||
//void CreateHTMLContainer()
|
||||
void SplashHTMLContainer()
|
||||
{
|
||||
HWND NewWindow = CreateWindowEx(
|
||||
WS_EX_TOOLWINDOW,
|
||||
"",
|
||||
"",
|
||||
WS_OVERLAPPEDWINDOW|WS_VISIBLE,
|
||||
0,
|
||||
0,
|
||||
HWND invisWindowHandle = CreateWindowEx(WS_EX_TOOLWINDOW,
|
||||
"htmlWindow",
|
||||
"Splash",
|
||||
WS_OVERLAPPEDWINDOW & ~WS_MAXIMIZEBOX & ~WS_THICKFRAME,
|
||||
200,
|
||||
200,
|
||||
500,
|
||||
300,
|
||||
0,
|
||||
0,
|
||||
HINSTANCE(NULL),
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL);
|
||||
ShowWindow(NewWindow, 1);
|
||||
UpdateWindow(NewWindow);
|
||||
printf("Creating Window HWND: %u\n", invisWindowHandle);
|
||||
ShowWindow(invisWindowHandle, 1);
|
||||
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;
|
||||
}
|
||||
int SplashHTMLLoadz(std::string strHTML)
|
||||
int PLACEHOLDER(std::wstring strHTML)
|
||||
{
|
||||
//CreateHTMLContainer();
|
||||
printf("%s \n", strHTML.c_str());
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
#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;
|
||||
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)
|
||||
{
|
||||
Application *app = (Application *)GetWindowLongPtr(hwnd, GWL_USERDATA);
|
||||
@@ -184,6 +189,8 @@ int main(int argc, char** argv) {
|
||||
settings.window.center = true; */
|
||||
HMODULE hThisInstance = GetModuleHandle(NULL);
|
||||
|
||||
if (!createWindowClass("htmlWindow",HtmlProc,NULL))
|
||||
return false;
|
||||
if (!createWindowClass("mainHWND",WndProc,hThisInstance))
|
||||
return false;
|
||||
if (!createWindowClass("toolboxHWND",ToolboxProc,hThisInstance))
|
||||
|
||||
Reference in New Issue
Block a user