Jump to content
  • Advertisement

Archived

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

To anyone who has "Tricks of the windows game programming gurus"

This topic is 5644 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 am having trouble using the bitmap loading demos, specifically DEMO7_10.exe/.cpp My problem is this: the bitmap loads, but a fraction of a second after it loads and displays, i can no longer see the bitmap. The screen turns to black. If anyone else had/has the same problem, please reply to this message. Thank you. Lucky("i need a new online nick")Newbie

Share this post


Link to post
Share on other sites
Advertisement
Hey there,

I had exactly the same problem.

Some nice person here suggested that it was because I had a background that was being drawn over the bitmap when the WM_PAINT
message got called.

So what I did was change:

winclass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);

to:
winclass.hbrBackground = NULL;

Therefore nothing will be used to paint over your program when WM_PAINT is called in the WindowProc callback function.

Hope this helps,

Cheers,
Rob

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!