Replace Control's Device Context
Posted on 2004-10-04
Is it possible to replace a Device Context (DC in the rest of the question) of some control with my own DC?
My intention is to make some control or window draw in memory, and not on screen.
After this is done, I would do some drawing on that image, and only then return the modified image to the screen.
I need something like this, becouse I'm drawing something to control's surface, but the control gets refreshed very often, so I have to repeat that drawing every time the control is refreshed.
This produces constant blinking of my drawing.
To avoid that, I thought maybe it's possible to refresh and redraw the complete control in memory, and paint the result on screen.
Is it possible?
P.S. Please note that I'm a VB6 programmer, and I know little about other languages. I asked this question here in general grogramming area, becouse I think if it can be done,
then it will probably be done with API's and API's are common to all programming languages.