WinAPI Browser Control in a window

Hello again to everybody.

I'm trying to view a GUI with a embedded HTML control (with the WinAPI). I've got a basic code for creating a window, but I don't know how to do that although I've been searching for solutions.

Is it possible to embed a HTML control / COM object into a window from a local URL. (Example: the compiled C++ executable is in a folder, in a subfolder, there is a designed HTML page with images etc. and will be shown in the window)

Thanks in advance for help from everyone, I'm really glad that that forum exists, it helps me very, very much :-) :-)
(BTW: There are many topics I would be able to respond to, but I always seem a minute too late, haha :-D)

Greetings,
Florian
Have a look at this article:
https://www.codeproject.com/articles/3365/embed-an-html-control-in-your-own-window-using-pla

This kind of code is not for the faint hearted. Do you really have to do it in plain C++ ?
A bit easier in MFC, much much easier in C#.
Thanks very much for your answer, I'll check that.
I'm very sorry that isn't working for me properly and yes, it should be in plain WinAPI/C++.
I am always working with the MinGW compiler, so there are many includes from the MSVC++ compiler which are missing.
There are two reasons for which I can not change:
1.) There are many standardized includes (for example: "dirent.h") which the MSVC compiler doesn't know have for POSIX standard reasons.
2.) The project is still to easify programming, but not cross-platform anymore, only for Windows. That language will be in German and it should combine HTML programming with C++. So in the end, I (and others) should be able to write something like CreatePage("ui.html") and everything else will be done in background with macros and internal callback functions. That would not be the problem, I'm also able to create a window easily with calling an internal callback function because it's just showing something, but I need a way to create that HTML or IE-Object control compatible with the MinGW compiler. I was not able to find a tutorial with COM objects (for example, a IE-object). It would also be to complicated to redistribute a redistributable Visual-C++ Runtime package.

To sum it up, what you posted was nice, but it does not work for me. I'm really sorry for my high demands, but there is no other solution for me.

Thanks for help from everyone,
Florian
Last edited on
I posted the exact thing you are asking here about two years ago. I used the Mingw x86 compiler. I embedded the Microsoft Internet Explorer COM Control in a window. I'll look for the link in a bit and post it for you. By the way, using the Mingw build chain works fine for COM/OLE.
Here's the link...

http://www.cplusplus.com/forum/windows/170992/

Good guess on my part. Two years and two months ago.

This is hard stuff that nobody's interested in. I'll help if you have difficulties, but it may take awhile as I'm going on a big trip and won't be available much for several weeks.
That code is pure Win32 Api code without any class frameworks that C++ coders typically use. I do all low level COM/OLE stuff. It works fine with Mingw x86 and even x64 if I recall correctly. Didn't know Jeff Glatt got into that part of it. I ought to look at Thomas' link. I do essentually the same thing, but never build as C anymore, though I'm more a C coder than a C++ one.
Thank you very much, I'll see. It seems a bit much code to me, but I'll copy it and hope it'll work then.

It seems a bit much code to me...


You've asked a very, very advanced question. There's probably me, Jeff Glatt, and maybe a dozen other C++ programmers in the whole world that interact with COM/OLE ActiveX Controls in the raw using low level COM without class frameworks to cookbook it and generate the 'magic' code in the background to make it work.
Topic archived. No new replies allowed.