CIconButton

CIconButton - A button control with an icon combined with text.
This class makes it possible to combine an icon and text on a button control. which unfortunately can’t be done with MFC’s CButton class.
I’ve tried to make it look and feel the same as the standard button, so text aligning and disabled mode are implemented exactly the same as the original Windows button.
CIconButton also has XP theme support (because it would look a kind of old-fashioned with XP themes enabled...). I’ve included a MFC theme wrapper class (CTheme) to simplify the use of themes.
The class has only one extra method:

void SetIcon(UINT nID, int nWidth, int nHeight);

where:
nID is the resource ID of the icon
nWidth is the width of the icon
nHeight is the height of the icon.

Check out the example to see the class is use.


Download example executable

Download source code
This class is part of the Pablo Software Solutions MFC Extension Package - Controls Edition
 

[Home] [Products] [Source Code] [Downloads]

© 2015 - Pablo Software Solutions
All rights reserved.