windows_programming_notes.nbk: Home | Index | Next Page: WM_PAINTICON | Previous Page: WM_PAINT


 WM_PAINTCLIPBOARD

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

A window receives this message through its WindowProc function.

    LRESULT CALLBACK WindowProc(
      HWND hwnd,       // handle to window
      UINT uMsg,       // WM_PAINTCLIPBOARD
      WPARAM wParam,   // handle to window (HWND)
      LPARAM lParam    // handle to memory object (HGLOBAL)
    );

Parameters

Return Values

If an application processes this message, it should return zero.

Remarks

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 PAINTSTRUCT to the dimensions given in the most recent WM_SIZECLIPBOARD message.

The clipboard owner must use the GlobalLock function to lock the memory that contains the PAINTSTRUCT structure. Before returning, the clipboard owner must unlock that memory by using the GlobalUnlock function.

Requirements


windows_programming_notes.nbk: Home | Index | Next Page: WM_PAINTICON | Previous Page: WM_PAINT


Notebook exported on Monday, 7 July 2008, 18:56:50 PM Eastern Daylight Time