Hey,
For my final project for school, I decided to program the known game SOKOBAN in Visual C++.
We didn't learn much about graphics but it's vital i'll use it.
So, what I have so far is all the classes for the game ready, and their implemntation, reading a level from a .txt file and import it to a viewable level by printing bits of images into a whole level (the level printing is being done by the BitBlt function)
My next thing to do was to clear the screen off all images and produce a second level, after the first one got finished (by clicking on a button for now) and I would like to know how can I clear the screen from all content (or if possible, from a given x1,y1 to x2,y2).
Thanks in advance!
Kedmyster

Graphics Issue
Steve McCormick
Kit Ewbank
Alright, I will try that.
Thanks alot! =) (will let you all know how it turns out heh)
Snuckles
If you don't repaint a region, Windows will leave it as it is until some other window paints over it. So you have to blank out whatever rect you need to, because Windows does not blank out an invalidated area on its own - it just leaves it as it is. Which is why, when you have a very busy process, you can switch to another window, and then switch back to the busy process window and still see the old window in the background.
Abrar
With the backgorund color
I thought there's an easier way, like, when you minimize the window, the whole content of it isn't being saved (unless we do something about it) and then when you maximize it, it's gone.
I thought I could do something the similar, but if that's the only option then I guess i'll have to use it.
Thanks!
Frank Forster
Hi,
What you can do is to 'clear' the graphics area. For this you can choose any color.
Regds.
Nick Sheng
How about using FillRect
imdqa
Thanks, I figured I could do that but it's not really a "good" solution for me.
I really appreciate your trying to help though!
Thanks,
Kedmyster