Sign in to follow this  
mrtie_dye

Another WIN32 API question

Recommended Posts

Is there a control for bitmaps? I have searched MSDN every which way I can I think of, but I keep running into a dead end. I know in resource.rc, I need a line something like this... MY_PICTURE BITMAP me.bmp And of course in resource.h ... #define MY_PICTURE 100 But how do I get that into a dialog? I would like to add it in just like you do with PUSHBUTTON, LTEXT, etc. I know how to do it in WM_PAINT, but then, my buttons and stuff don't get re-drawn. Any help is greatly appreciated.

Share this post


Link to post
Share on other sites
I think you would do it something like this:
since I've been using MFC a lot and VC++ I havent needed to think about this, but anyways, this would go in your dialog definition block. I assume the numbers at the end are for position and size, but i don't know which is which.

CONTROL MY_PICTURE,IDC_MY_PICTURE_CONTROL,"Static",SS_BITMAP,65,15,11,10

You would also have to define IDC_MY_PICTURE_CONTROL

Let me know if this is rubbish!

Share this post


Link to post
Share on other sites
Thanks for the effort, but that code does not seem to work. I tried re-arranging several elements in your statement, but I could not get it to work. Any other ideas?

EDIT: Also, does anyone else see 3 blank posts by Mulligan? What's up with that?

Share this post


Link to post
Share on other sites
Mulligan is probably getting timeout errors. I had the same problem a few weeks ago. He probably needs to logout, delete his gamedev cookies and then log back in. If that doesn't work it could be that there's just too much traffic and he needs to try again later.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this