Link to home
Start Free TrialLog in
Avatar of mpenner
mpenner

asked on

Icons on CButton

This is probably an easy question to answer but here goes:  how do I change the display size of an icon (or set it) on a CButton?  I have a 16x16 icon that seems to be displayed in 32x32 by default.  Thanks.
Avatar of guruprasad031298
guruprasad031298

For converting from 32X32 to 16X16, load the icon through the resource editor and convert
it from 32X32 to 16X16 by setting the target device to 16X16.

To load the Icon, use LoadIcon member function of CWinApp. This will return a handle to the Icon object (HICON). Use the SetIcon member function of CButton to the Icon, passing it's handle (HICON)

Hope this helps !!!
Avatar of mpenner

ASKER

This icon has only been made as a 16x16 icon.  It has been successfully displayed on the button but appears as a 32x32 icon.  
ASKER CERTIFIED SOLUTION
Avatar of Andy_Keys
Andy_Keys

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mpenner

ASKER

Thanks a lot.