Hey everybody,

just read this in the API under GetDCEX


flags:
DCX_VALIDATE When specified with DCX_INTERSECTUPDATE, causes the device context to be completely validated. Using this function with both DCX_INTERSECTUPDATE and DCX_VALIDATE is identical to using the BeginPaint function.


So, it seems that you can replace BeginPaint with GetDCEx,hWin,NULL,DCX_VALIDATE or DCX_INTERSECTUPDATE

ALSO, if you use CS_OWNDC (like I often do) you needn't call EndPaint or RelaseDC

I tried it out on one of my programs and it worked great :)
However, does anyone know of any caveats to using GetDCEx as a replacement for BeginPaint/EndPaint. Or is this legit to do?

Thanks

--Chorus
Posted on 2002-07-27 09:11:09 by chorus
I specify cs_owndc and i use getdcex in my "eternal game in progress" and i don't use BeginPaint/EndPaint

I have never had any issues as a result.




:alright:
Posted on 2002-07-27 11:41:00 by IwasTitan
chorus, thanks for the info - sounds like a good windows tip.
Posted on 2002-07-27 23:21:14 by bitRAKE