Coder Social home page Coder Social logo

cwebpage's Introduction

CWebPage Project

I was looking for ways to create a dialog control that handled and displayed HTML, and came across this great source, posted by Jeff Glatt, on December 12th, 2002 -

https://www.codeguru.com/cpp/i-n/ieprogram/article.php/c4379/Display-a-Web-Page-in-a-Plain-C-Win32-Application.htm

While it is not a control in a dialog, it is a great example of a way to create a WIN32 simple window, and display HTML, in essence using the Microsoft IWebBrowser2 interface, but read the very well written, descriptive article, and study the source to understand more...

My first effort was the add a cmake build file generator, since this supports most versions of MSVC you may have installed, and lots of other windows code generators... and removed the dsw/dsp files...

My first wrinkle was in building the x64, 64-bit, WIN64 version. The interface replies on storing a pointer to the interface in the GWL_USERDATA, but that had to be changed for WIN64 to GWLP_USERDATA... not very difficult with an #ifdef WIN64 like macro switch...

Now it can be built either as 32 or 64 bit projects...

Note, the main aim of this code is educational in nature... just some sample code using the IWebBrowser2 interface, and is not intended as a fully functional application...

Building

> cd build # or build.x64
> cmake .. [options]
> cmake --build . --config Release

The above build folders contain a build-me.bat, which should work if you have MSVC14 2015 installed, or with any other installed MSVC with a few minor changes... some warnings may be issued, but should be no particular problem...

License

The original codeguru zip source does not appear to have any license statement, it is noted it is more or less repeated on codeproject, which implies it is under a The Code Project Open License (CPOL), but to the extent possible this modified source is released under GNU GPL v2 (or later, at your discretion) - See LICENSE.txt...

My big thanks to Jeff, and enjoy...

Geoff. 20171220

; eof

cwebpage's People

Contributors

geoffmcl avatar

Watchers

James Cloos avatar 江湖隐行客 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.