From 03fd38aaa74af53daca8e2d8e5a91c17c08eefea Mon Sep 17 00:00:00 2001 From: MusicalProgrammer <38636805+MusicalProgrammer@users.noreply.github.com> Date: Fri, 6 Jul 2018 19:23:52 -0400 Subject: [PATCH] IWebBrowser2 added and is functional. --- main.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/main.cpp b/main.cpp index e2e262c..aa2e5b0 100644 --- a/main.cpp +++ b/main.cpp @@ -77,11 +77,11 @@ Demo::Demo(const GAppSettings& settings,HWND parentWindow) { //: GApp(settings,w _hWndMain = parentWindow; HMODULE hThisInstance = GetModuleHandle(NULL); - + IWebBrowser2* wb = 0; _hwndToolbox = CreateWindowEx( WS_EX_ACCEPTFILES, - "toolboxHWND", - "Main test", + "AX", + "{8856F961-340A-11D0-A96B-00C04FD705A2}", WS_CHILD | WS_VISIBLE, 0, 560, @@ -92,6 +92,15 @@ Demo::Demo(const GAppSettings& settings,HWND parentWindow) { //: GApp(settings,w hThisInstance, NULL ); + + SendMessage(_hwndToolbox,AX_INPLACE,1,0); + SendMessage(_hwndToolbox,AX_QUERYINTERFACE,(WPARAM)&IID_IWebBrowser2,(LPARAM)&wb); + if (wb) + { + wb->Navigate(L"https://scottbeebiwan.tk/g3d/toolbox/",0,0,0,0); + wb->Release(); + } + _buttonTest = CreateWindow( "COMBOBOX", "", @@ -1562,6 +1571,7 @@ int main(int argc, char** argv) { OleInitialize(0); if (!AXRegister()) return 0; + tempPath = ((std::string)getenv("temp")) + "/"+PlaceholderName; CreateDirectory(tempPath.c_str(), NULL);