Jump to content
  • Advertisement
Sign in to follow this  
Xcron

Problem with resizing of window

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

Hello, I'm currently going along with the NeHe tutorials and after finishing the second tutorial that involves the drawing of a triangle and a square in the window, I noticed a problem. When resizing the window, the contents are not completely re-drawn: the new window clears to the correct color but the contents of the drawscene() function are not re-drawn. Could anybody possibly have an idea of where I might try to look to solve this problem? I was thinking it may have been the MSG variable in WinMain that was causing the problem because the MSG variable was constantly checked in the while loop and because it didn't look like a pointer to me (I'm guessing the MSG type may have been defined to be a type of pointer) I thought that it would constantly see the same message posted. Next, I tried to look for colors and specifically the color the program used to draw with. I was thinking that the color may have been changed somehow. So I cleared the screen to white and still nothing was drawn. Next, I thought that maybe the drawscene() function was not called after the resizing of the window so I did a little testing by having messages pop up if stuff was re-drawn on the new window and it was. I'm just running out of ideas, though I could try to keep going. I think that if I don't receive any response from here, I'll try to download the DevC++ source that they provided and see whether they have the same problem...if not, then I can just cross-check my code. Hopefully, somebody will have some insight though so that I can try to learn a little on my own.

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!