Sign in to follow this  

Why wont it paint?

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

This topic is 3318 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this