Introduction
Using this class you can subclass CDialog
. The main reasons for doing this are twofold - to minimize the work done by your MFC dialog-class (like removing silly icon paint on minimized) and thereby decrease your workload and to personalize your dialogs (and to have some fun).
In the example project, notice that you have to link againt msimg32.lib in order to use the ::GradientFill(...)
function but you do not have to compile using a redefinition of WINVER
and/or _WIN32_WINNT
. For details see my slightly modifyed stdafx.h. If you allow redefine WINVER
to 0x0500
a better set of constructors are avalible using information for the gradient fill of the active caption on the target OS. Needless to say of course - but using this base class you can have dialogs (or windows with a small modification) in 'private' colors because they paint themselves.
I don't think that there is much more to it. Using the class is in the exact same manner as its base class (plain CDialog
) - apart from bigger constructors.
Note that not all event handlers are used. I have implemnted them for future versions.
Good luck.
Ps. And yes I respond to WM_SYSCOLORCHANGE
:-).