Re: Adding Bitmap To button?
Did you try to use CButton::SetBitmap method?
Re: Adding Bitmap To button?
Quote:
Originally Posted by
VictorN
Did you try to use CButton::SetBitmap method?
Would you please be able to elaborate? I've seen it, but haven't found a good example.
Re: Adding Bitmap To button?
Quote:
i just need to add a simple bitmap to it
Add or put? Add implies having a bitmap along with a text. And the latter unfortunately is not that easy as it looks for the first glance. :) But if this is the put case, SetBitmap will do the trick alright.
Quote:
I've seen it, but haven't found a good example.
Isn't that from MSDN good enough?
Code:
CButton myButton;
// Create a bitmap button.
myButton.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_BITMAP,
CRect(10,10,60,50), pParentWnd, 1);
// Set the bitmap of the button to be the system check mark bitmap.
myButton.SetBitmap( ::LoadBitmap(NULL, MAKEINTRESOURCE(OBM_CHECK)) );