Embed HTML browser into a native C++/Win32 project

2019-01-23 17:59发布

I have a C++ project in the MS Visual Studio 2008 IDE (note, NO MFC, NO .NET, just native Win32 APIs!) and I was wondering if it is possible to add to it a child window that can parse and render HTML/CSS/JavaScript, like a browser. It would be very good if that window did not have browser controls/buttons/borders -- if it just rendered HTML.

Is it a tall order to ask for such?

1条回答
神经病院院长
2楼-- · 2019-01-23 18:10

You could embed an HTLM Browser (Internet Explorer) within your windows with some heavy use of COM. I used to do that and have the same need to avoid MFC, .NET, etc. This control is quite configurable, and you can remove and/or override pretty much anything.

I did my work based on an old article in The Code Project: http://www.codeproject.com/KB/COM/cwebpage.aspx

查看更多
登录 后发表回答