Easy Shadow Drawing with MFC

Years ago I had to draw shadows in a custom image thumbnails viewer and the code I used  was prety complicated and slow. Now can do that much easier by using CDrawingManager MFC class, defined in afxdrawmanager.h header file.

Draw shadows using CDrawingManager::DrawShadow

Here is a simple example:

You can even more speed up the drawing by passing two CBitmap objects, one for the bottom and one for the right shadow.

A little bit more practical example can be found in the demo project attached to this article.

A simple thumbnail viewer using CDrawingManager for drawing shadows

Download demo project: MFC Shadow Drawing Demo.zip (1885)

Thumbnail Viewer

Thumbnail Viewer

Resources and related articles

Leave a Reply