GetDC vs BeginPaint

Started by
1 comment, last by xllx_relient_xllx 18 years, 10 months ago
This is a simple question (I think): when should I use GetDC/ReleaseDC and when should I use BeginPaint/EndPaint? I'm a little confused about the difference... Thanks in advance!!!1
Advertisement
Shishio,

Use BeginPaint/EndPaint only within a WM_PAINT message handler. Otherwise, use GetDC/ReleaseDC.
Jeromy Walsh
Sr. Tools & Engine Programmer | Software Engineer
Microsoft Windows Phone Team
Chronicles of Elyria (An In-development MMORPG)
GameDevelopedia.com - Blog & Tutorials
GDNet Mentoring: XNA Workshop | C# Workshop | C++ Workshop
"The question is not how far, the question is do you possess the constitution, the depth of faith, to go as far as is needed?" - Il Duche, Boondock Saints
BeginPaint, unlike GetDC will hide the Caret (if there is any), Restrict drawing only to the Invalid Region and Validate the Region for you. I think it does a couple more things but that's what I know so far.

relient.

This topic is closed to new replies.

Advertisement