EndPaint function (winuser.h)

The EndPaint function marks the end of painting in the specified window. This function is required for each call to the BeginPaint function, but only after painting is complete.

Syntax

BOOL EndPaint(
  [in] HWND              hWnd,
  [in] const PAINTSTRUCT *lpPaint
);

Parameters

[in] hWnd

Handle to the window that has been repainted.

[in] lpPaint

Pointer to a PAINTSTRUCT structure that contains the painting information retrieved by BeginPaint.

Return value

The return value is always nonzero.

Remarks

If the caret was hidden by BeginPaint, EndPaint restores the caret to the screen.

EndPaint releases the display device context that BeginPaint retrieved.

Examples

For an example, see Drawing in the Client Area.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header winuser.h (include Windows.h)
Library User32.lib
DLL User32.dll
API set ext-ms-win-ntuser-draw-l1-1-0 (introduced in Windows 8)

See also

BeginPaint

PAINTSTRUCT

Painting and Drawing Functions

Painting and Drawing Overview