INF: Using EndPaint() and BeginPaint()

ID Number: Q10216

2.00 2.03 2.10 3.00

WINDOWS

Summary:

The PAINTSTRUCT structure contains information for an application that

can be used to paint the client area of a window owned by that

application.

The PAINTSTRUCT data structure is automatically updated by the

BeginPaint() Windows procedure; if a window has been restored,

BeginPaint() will update the PAINTSTRUCT fields (for example,

fRestore). The application would be duplicating effort if it also

updated the fields of the PAINTSTRUCT after a window is restored. The

EndPaint() procedure is required after BeginPaint(). The application

only needs to be concerned about its own paint procedure that comes

between BeginPaint() and EndPaint().

See page 7-55 in the "Microsoft Windows Software Development Kit

Reference Volume 2" for more information on the PAINTSTRUCT data

structure.