Hi, I’m posting this not to ask a question , but to tell everyone something they might have a problem with.
It’s about using double-buffering in your program and to clear the screen initially.
In my case, using double-buffering used to work for my paint program only when i painted something on the screen. The initial screen was always a background of the windows environment I was in (that’s confusing for a novice- he would have no idea of whether his program works or not.)
The I started thinking in terms of buffers, and this is where I hit upon the idea of clearing the screen (one buffer now), swap the buffers, and clear the other one.All cleared!! So the initial screen what one wanted to see is a clear screen(with just code to clear the screen, in the display-callback routine).
Probably this is one reason why guys in the universities dont write paint programs using double-buffering!!
I hope this helps certain people now.