SetClipboardViewer

Syntax

HWND SetClipboardViewer(hWnd)

This function adds the window specified by the hWnd parameter to the chain of windows that are notified (via the WM_DRAWCLIPBOARD message) whenever the contents of the clipboard are changed.

Parameter Type/Description  

hWnd HWND Identifies the window to receive clipboard-viewer chain messages.  

Return Value

The return value identifies the next window in the clipboard-viewer chain. This handle should be saved in static memory and used in responding to clipboard-viewer chain messages.

Comments

Windows that are part of the clipboard-viewer chain must respond to WM_CHANGECBCHAIN, WM_DRAWCLIPBOARD, and WM_DESTROY messages.

If an application wishes to remove itself from the clipboard-viewer chain, it must call the ChangeClipboardChain function.