WM_PAINTCLIPBOARD

2.x

WM_PAINTCLIPBOARD
hwndViewer = (HWND) wParam;              /* handle of viewer     */
pps = (PAINTSTRUCT FAR*) LOWORD(lParam); /* points to paint data */

The WM_PAINTCLIPBOARD message is sent by a clipboard viewer to the clipboard owner when the owner has placed data on the clipboard in the CF_OWNERDISPLAY format and the clipboard viewer's client area needs repainting.

Parameters

hwndViewer

Value of wParam. Specifies a handle to the clipboard viewer window.

pps

Value of the low-order word of lParam. Points to a PAINTSTRUCT data structure that defines which part of the client area to paint. The PAINTSTRUCT structure has the following form:

typedef struct tagPAINTSTRUCT {     /* ps */
   HDC  hdc;
   BOOL fErase;
   RECT rcPaint;
   BOOL fRestore;
   BOOL fIncUpdate;
   BYTE rgbReserved[16];
} PAINTSTRUCT;

Return Value

An application should return zero if it processes this message.

Comments

To determine whether the entire client area or just a portion of it needs repainting, the clipboard owner must compare the dimensions of the drawing area given in the rcPaint member of the PAINTSTRUCT structure to the dimensions given in the most recent WM_SIZECLIPBOARD message.

An application must use the GlobalLock function to lock the memory that contains the PAINTSTRUCT data structure. The application should unlock that memory by using the GlobalUnlock function before it yields or returns control.

See Also

GlobalLock, GlobalUnlock, WM_SIZECLIPBOARD