Platform SDK: Interprocess Communications

WM_SIZECLIPBOARD

The WM_SIZECLIPBOARD 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 has changed size.

A window receives this message through its WindowProc function.

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

Parameters

wParam
Handle to the clipboard viewer window.
lParam
Handle to a global memory object that contains a RECT structure. The structure specifies the new dimensions of the clipboard viewer's client area.

Return Values

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

Remarks

When the clipboard viewer window is about to be destroyed or resized, a WM_SIZECLIPBOARD message is sent with a null rectangle (0, 0, 0, 0) as the new size. This permits the clipboard owner to free its display resources.

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

Requirements

  Windows NT/2000: Requires Windows NT 3.1 or later.
  Windows 95/98: Requires Windows 95 or later.
  Header: Declared in Winuser.h; include Windows.h.

See Also

Clipboard Overview, Clipboard Messages, GlobalLock, GlobalUnlock, RECT