Advertisement Jump to content
Sign in to follow this  

Changing dialog box picture control image

This topic is 3725 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
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!