Disabling Bitmap Button loses bitmap 
Author Message
 Disabling Bitmap Button loses bitmap

I'm using MFC to put a bitmap
in a button, but when I disable
the button, the bitmap inside the
button becomes just a gray square.

How do I deal with this.

Thanks.

Here's my code

This part works fine...

     HBITMAP hBmpSend;
     hBmpSend = (HBITMAP)LoadImage(AfxGetInstanceHandle (),
MAKEINTRESOURCE(IDB_SEND),  _
                              IMAGE_BITMAP, 20, 20, LR_DEFAULTCOLOR );

     ::SendMessage(m_SendButton, BM_SETIMAGE, IMAGE_BITMAP, (LPARAM) (DWORD)
hBmpSend  );

But when I call this, the bitmap turns into a gray square.

    m_SendButton.EnableWindow(FALSE);



Wed, 26 Nov 2003 03:32:12 GMT  
 Disabling Bitmap Button loses bitmap

Quote:
>I'm using MFC to put a bitmap
>in a button, but when I disable
>the button, the bitmap inside the
>button becomes just a gray square.

>How do I deal with this.

Eric,

If you can use an icon rather than a bitmap, it'll probably look fine
(greyed) when disabled.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Wed, 26 Nov 2003 04:54:03 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Disabled bitmap for button control

2. No Bitmap when Button disabled

3. Disabling Bitmap buttons on a CDlgBar

4. bitmap, bitmap, bitmap

5. Bitmap buttons to behave like radio buttons?

6. Array of bitmap images lost when dialog box dragged

7. Splash Screen bitmap loses colors

8. Hwnd of window (MFC bitmap bitmap control)

9. Converting 24 bits bitmap to mono bitmap

10. 16bit bitmap -> 24bit bitmap

11. Bitmap Resource and Bitmap File

12. BitBlt() to copy one bitmap onto another bitmap...

 

 
Powered by phpBB® Forum Software