SetClipboardViewer

2.x

  HWND SetClipboardViewer(hwnd)    
  HWND hwnd; /* handle of clipboard viewer */

The SetClipboardViewer function adds the given window to the chain of windows that are notified (by means of the WM_DRAWCLIPBOARD message) whenever the contents of the clipboard are changed.

Parameters

hwnd

Identifies the window to receive clipboard-viewer chain messages.

Return Value

The return value is the handle of the next window in the clipboard-viewer chain, if the function is successful.

Comments

Applications should save this handle in static memory and use it when responding to clipboard-viewer chain messages.

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

To remove itself from the clipboard-viewer chain, an application must call the ChangeClipboardChain function.

See Also

ChangeClipboardChain, GetClipboardViewer