Jump to content
  • Advertisement
Sign in to follow this  
InetRoadkill

Changing dialog box picture control image

This topic is 3664 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

I'm working on a front-end to my game compilers. I've created a dialog box which shows the progress of each compiler. When each compiler completes, I would like to display a picture (a .bmp image) next the name of the compiler. The dialog is working fine, except I can't get the image to display. I've created two bitmap images (a green check and a red X) to indicate the success or failure of the compiler step. They are imported as resources and given ID numbers. They are loaded as a pair of CBitMap objects: RC = OkBmp.LoadBitmap(IDB_BITMAP1); RC = FailBmp.LoadBitmap(IDB_BITMAP2); The return code says they loaded successfully. In my dialog handler, I have a function which is supposed to change the image (for example display the checkmark): void SetCheck ( ) { SendMessage(_hWnd, STM_SETIMAGE, SS_BITMAP, IDB_BITMAP1 ); } I know the 4th parameter is wrong and needs to be a handle. But I don't know how to get the appropriate handle from the CBitMap object to feed into SendMessage(). I imagine it's something simple. Could someone throw me a hint?

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!