Advertisement Jump to content
Sign in to follow this  

Problem with resizing of window

This topic is 4212 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
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!