WebPageRendering


window.png

PeteSearch displays previews of search results in a split-screen mode, side-by-side with the results page.To do this in Internet Explorer, I needed a child window that would show and handle interaction with a web site. At first, it looked like it would be easy using AtlAxWin, but it turned out to rely on statically linking to the ATL lib, which isn't present on the Express edition of Visual Studio. Having got this far into the port using the free version, I didn't want to admit defeat, so I looked around for alternatives.

It turned out to involve a lot of COM boiler-plate, but with the help of Lucian Wischik's example code, I was able to create a simple browser window class.

You can download a zip of the source code that contains the class here, or check CVS on Sourceforge for the most up-to-date version. There's a class in there called CPeteWebWindow that lets you create a child window that handles rendering and navigating an external web page. Using Lucian's example, it was surprisingly painless to implement. The process of actually adding a window to Internet Explorer turned out to be very hard, but that's a story for another article!=