Link to home
Start Free TrialLog in
Avatar of joeslow
joeslow

asked on

Bitmap on a CButton

I have a CButton that I want a bitmap on.

CBitmap m_bmpMyBitmap;
CButton m_btnMyButton;

m_bmpMyBitmap.LoadBitmap(IDB_BITMAP1);
m_btnMyButton.SetBitmap(m_bmpMyBitmap);

This works fine until I disable the button:

m_btnMyButton.EnableWindow(false);

The button now just has a gray square where the bitmap should be.
I want it to be a "disabled" looking picture.
The bitmap was drawn 16x16 and the background was light gray (same as a button).
If the background was filled white, disabled looks good but enabled shows white on the button.

What do I need to do?
ASKER CERTIFIED SOLUTION
Avatar of ddeboskey
ddeboskey

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 joeslow
joeslow

ASKER

I followed the example in the MFC help on CBitButton and was able to get a button on a dialog, but how do you control the exact size and placement of the button?