SilentJackqh
September 23rd, 2003, 01:07 PM
I usually used GetDC, never used Begin Paint to paint something in WM_PAINT.
what's the different ?
and which one is faster ?
what's the different ?
and which one is faster ?
|
Click to See Complete Forum and Search --> : What's the different between Begin paint and GetDC ? SilentJackqh September 23rd, 2003, 01:07 PM I usually used GetDC, never used Begin Paint to paint something in WM_PAINT. what's the different ? and which one is faster ? hankdane September 23rd, 2003, 07:09 PM BeginPaint() does a little more than GetDC(). For instance, it automatically validates the regions that have been invalidated. Because it sets up clipping regions so that you won't paint in areas that are not invalidated, BeginPaint() will often be faster than GetDC(). I use GetDC() when painting but not in response to a WM_PAINT message. For instance, if I set up a timer to animate a sprite or something, you have to use GetDC(). However, for the reasons stated above, I always use BeginPaint() in response to WM_PAINT. codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |