Jump to content
  • Advertisement

Archived

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

fireking

Application Destruction leaves behind some garbage

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

When my program is done executing (ie: ive closed it), it will sometimes leave behind screen garbage. As in, part of the window that was there before stays on the screen. My application is rapidly drawing to the window using the GDI, such as a basic tile engine game would. When I close, some of the map tiles from the window will stay on the screen, if i click Show Desktop, or click on another window, it will go away. What function should I call to remedy this? I tried PaintDesktop(Mywindowdc) and it seems to work, but im not sure if its the correct way to do it. Thanks, --Fireking Owner/Leader Genetics 3rd Dimension Development

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
What''s happening is that the background isn''t receiving a WM_PAINT message with the correct invalidated RECT.

One cause could be that you are drawing outside your window region. If this were the case, when you application terminated, you would have a clear(clean, undirty) rect where your window was and all of the places where you were drawing outside the window would still be there.

The solution to that problem is to make your window bigger.

Otherwise, keep sending a Paint message to a program you know would invalidate the whole screen (such as the desktop) or look through the platform SDK about invalidating the entire screen.

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.

GameDev.net 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!