WM_SYNCPAINT

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

WM_SYNCPAINT 
 = wParam;   // reserved for use by the system
 = lParam;   // reserved for use by the system
 

Return Values

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_ERASEDBKGRND message if the window background must be erased.

QuickInfo

  Windows NT: Requires version 5.0 or later.
  Windows: Requires Windows 98 or later.
  Windows CE: Unsupported.
  Header: Declared in winuser.h.

See Also

Painting and Drawing Overview, Painting and Drawing Messages, DefWindowProc, GetWindowDC, WM_PAINT GetDCEx