CWnd::OnSizeClipboard

The Clipboard owner's OnSizeClipboard member function is called by the Clipboard viewer when the Clipboard contains data with the CF_OWNERDISPLAY attribute and the size of the client area of the Clipboard-viewer window has changed.

afx_msg void OnSizeClipboard(
   CWnd* pClipAppWnd,
   HGLOBAL hRect 
);

Parameters

  • pClipAppWnd
    Identifies the Clipboard-application window. The pointer may be temporary and should not be stored.

  • hRect
    Identifies a global memory object. The memory object contains a RECT data structure that specifies the area for the Clipboard owner to paint.

Remarks

The OnSizeClipboard member function is called with a null rectangle (0,0,0,0) as the new size when the Clipboard application is about to be destroyed or minimized. This permits the Clipboard owner to free its display resources.

Within OnSizeClipboard, an application must use the GlobalLock Windows function to lock the memory that contains the RECT data structure. Have the application unlock that memory with the GlobalUnlock Windows function before it yields or returns control.

备注

This member function is called by the framework to allow your application to handle a Windows message. The parameters passed to your function reflect the parameters received by the framework when the message was received. If you call the base-class implementation of this function, that implementation will use the parameters originally passed with the message and not the parameters you supply to the function.

Requirements

Header: afxwin.h

See Also

Reference

CWnd Class

Hierarchy Chart

GlobalLock

GlobalUnlock

SetClipboardData

CWnd::SetClipboardViewer

WM_SIZECLIPBOARD

Concepts

CWnd Members