This function is generally call during the processing of a WM_PAINT message when the application needs to update the content of the window.

If the presentation space already exists, its update region is set and the device context of the window is associated with the presentation space. Otherwise, a cache presentation space is obtained specifically for the window.

The update region associated with hwnd is reset to NULLHANDLE. It is assumed that any drawing following this function restores the content of the window to a fully correct state.

This function hides the pointer if it is in the window and the WinEndPaint function restores it.

This function hides the tracking rectangle if it is active and might hide part of the painting window; that is, if hwnd is a child of the window specified by the hwnd parameter in the WinTrackRect function. The WinEndPaint function shows it again.

WinEndPaint must be called after the application completes drawing, and can be nested for the same window.


[Back] [Next]