WM_SYNCPAINT message

The WM_SYNCPAINT message is used to synchronize painting while avoiding linking independent GUI threads.

A window receives this message through its WindowProc function.

LRESULT CALLBACK WindowProc(
  HWND hwnd, 
  UINT  uMsg, 
  WPARAM wParam, 
  LPARAM lParam     
);

Parameters

wParam

This parameter is not used.

lParam

This parameter is not used.

Return value

An application returns zero if it processes this message.

Remarks

When a window has been hidden, shown, moved, or sized, the system may determine that it is necessary to send a WM_SYNCPAINT message to the top-level windows of other threads. Applications must pass WM_SYNCPAINT to DefWindowProc for processing. The DefWindowProc function will send a WM_NCPAINT message to the window procedure if the window frame must be painted and send a WM_ERASEBKGND message if the window background must be erased.

Requirements

Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Header
Winuser.h (include Windows.h)

See also

Painting and Drawing Overview

Painting and Drawing Messages

DefWindowProc

GetDCEx

GetWindowDC

WM_PAINT