Platform SDK: Interprocess Communications

GetOpenClipboardWindow

The GetOpenClipboardWindow function retrieves the handle to the window that currently has the clipboard open.

HWND GetOpenClipboardWindow(VOID);

Parameters

This function has no parameters.

Return Values

If the function succeeds, the return value is the handle to the window that has the clipboard open. If no window has the clipboard open, the return value is NULL. To get extended error information, call GetLastError.

Remarks

If an application or dynamic-link library (DLL) specifies a NULL window handle when calling the OpenClipboard function, the clipboard is opened but is not associated with a window. In such a case, GetOpenClipboardWindow returns NULL.

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.
  Library: Use User32.lib.

See Also

Clipboard Overview, Clipboard Functions, GetClipboardOwner, GetClipboardViewer, OpenClipboard