Jump to content
  • Advertisement
Sign in to follow this  
Code Is Your Friend

Why wont it paint?

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

Well, I have a program that allows freehand style drawing (think paint with the pencil tool) anyway I need to save the image once it has been altered from drawing. The problem is when something happens over the window, say explorer opening so they can save it, when it goes it leaves a large white space behind it. It also happens when something is dragged over the window, so I guess what im lacking is a paint function. So if thats true, how would I make one that can keep the marks on the screen when it refreshes? Thanks, Matt I am using c++, vis studio 2008, and xp.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Code Is Your Friend
Well, I have a program that allows freehand style drawing (think paint with the pencil tool) anyway I need to save the image once it has been altered from drawing. The problem is when something happens over the window, say explorer opening so they can save it, when it goes it leaves a large white space behind it. It also happens when something is dragged over the window, so I guess what im lacking is a paint function. So if thats true, how would I make one that can keep the marks on the screen when it refreshes?
You need to do all your painting to an offscreen surface, and then copy that to the main window. If you're using GDI, you'll want to BitBlt() to the window in the WM_PAINT handler, and call InvalidateRect() to force a WM_PAINT message to be sent.

Share this post


Link to post
Share on other sites
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!