Advertisement Jump to content


This topic is now archived and is closed to further replies.


yet another win32 question

This topic is 6883 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

so, what exactly is the point of PAINTSTRUCT ? i''ve been messing around with some sample applications in an attempt to learn win32 programming ( i''m getting the basics fairly well, for the most part ). I ran across that, typed in the sample code, but i don''t paticularly understand it all that well. also, is there any place i can go to see a listing of the more commonly used functions for windows programming?

Share this post

Link to post
Share on other sites
"This information can be used to paint the client area of a window owned by that application. " - MSDN

All client window painting has to go between BeginPaint and EndPaint. PAINTSTRUCT * is a necessary argument for these calls and the data returned in the PAINTSTRUCT can be used for drawing the client area.

However, the only thing I would use from it is the HDC member, but I generally get that as the return value from BeginPaint(...).

I don''t know about "commonly used" functions, but microsofts site would be a good starting point.



Share this post

Link to post
Share on other sites
The PAINTSTRUCT is used by Windows to know which part of a window to repaint (the invalid rect), the clipping region for a particular operation and a few other internals.

As to your other question, I believe that anyone who plans to do a fair amount of Windows programming should have a good book on the subject. There''s just too much to learn and the help documentation in MSDN is often rather vague on some points. Programming Windows by Charles Petzold is excellent. Buy it! Once you get comfortable with the API, you''ll use it frequently as a reference (in addition to MSDN).

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!