• Advertisement

Archived

This topic is now archived and is closed to further replies.

MFC - Static Boxes and bitmaps!?

This topic is 5922 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

My dialog has a static box of type bitmap. They have been made with the editor, so I dont have to call Create(). My static box is associated with a variable of type CStatic. Now my problem is that the static box doesnt display bitmaps (although it can display a default image at startup). I have no clue. I checked return values and everything seems to be OK. My final call is MyCStaticBox.SetBitmap(HBitmap); Do I need to call another function to update the box or something? please help - this is driving me nearly insane! ~ I''''m a wannabe programmer ~

Share this post


Link to post
Share on other sites
Advertisement
Did you try forcing a redraw with a call to Invalidate() after the SetBitmap? Also, is the bitmap of the same color depth (8, 16, 24, or 32 bit) as the display? I don''t remember if SetBitmap is supposed to automatically convert or not. Is the area all white, or garbled? If all white, it may be that you need to force a redraw or the HBITMAP is bad (null, for example). If it is garbled, it might be the format of the bitmap doesn''t match the display.

Sorry can''t be of more help. Try the Invalidate and let us know.

Share this post


Link to post
Share on other sites

  • Advertisement