# PicLook V2.2

I originally hacked this program from the 'DIBLOOK' MFC example, with the added capability of multi-format viewing besides BMP. This is a testbed for paintlib under Win32, really. There's a wealth of nicer, more capable and free graphics viewers (and even editors) out there. But the difference is that with this one you get full source code, which you may reuse at will in derived work. Just acknowledge their due credit to the authors of paintlib and the decoding libraries it relies on.

Besides these fine people (please have a look at the program's "about box"), I also incorporated in this release some code from other authors. In particular:

- ### DrawDib drawing:

The CWinBmpEx illustrates how to use the DrawDib API as an alternative to plain GDI rendering. It is greatly inspired by the enjoyable articles of Paul Di Lascia on the subject, originally published between the january and june ´97 issues of MSJ. They are also now available online. Look for "More Fun with MFC: A Gamut of Reusable Goodies". While you're at it, read all this folk's articles. You won't lose your time. "Meandering Through the Maze of MFC Message and Command Routing" is particularly enlightening. If you're struggling with MFC on a regular basis, that is.

- ### Zooming:

Brad Pirtle wrote a very good explanation on how to implement zooming by using the standard GDI devices such as window and viewport. His code constitutes the ZoomView module I used in this release of PicLook.

- ### Panning:

If you have a three-mouse button, do yourself a favor: go grab the panning code available at codeguru. It is cleverly packaged as a DLL, so you don't have to cut and paste code and resources (cursors mostly) to integrate it in your project. To activate it within PicLook, define the "OWND" symbol. Many thanks to Russ Freeman.

Mouse Usage | Default | Zoom Mode
--- | --- | ---
Left button | grab & pan | zoom in / define area to zoom
Middle button | IE-like panning (when ownd.dll is available) | fit to window
Right button | "unzoom" | zoom out

Since the "video for windows" DrawDib API does not honor the GDI mapping mode that make zooming possible, this version of the program only uses it for file previewing. If you feel this makes it slower on your machine, you can try and recompile with the "USES_DRAWDIB" symbol defined in the project settings. But then zooming will not be available...

I hope you'll enjoy PicLook. If you enrich it somehow, please consider contributing your enhancements back to PainLib.

Happy C++ coding,

Bernard Delmée, March 2000.