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, and implement split-screen preview in PeteSearch.
You can download a zip of my latest source code here, or it’s available from through CVS on Sourceforge. 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 post!