Jump to content

WinCloseClipbrd

From EDM2
Revision as of 01:47, 13 May 2023 by Martini (talk | contribs) (Created page with "This function closes the clipboard, allowing other applications to open it with the WinOpenClipbrd function. ==Syntax== WinCloseClipbrd(hab) ==Parameters== ; hab (HAB) - i...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This function closes the clipboard, allowing other applications to open it with the WinOpenClipbrd function.

Syntax

WinCloseClipbrd(hab)

Parameters

hab (HAB) - input
Anchor-block handle.

Returns

rc (BOOL) - returns
Success indicator.
TRUE
Successful completion
FALSE
Error occurred.

Remarks

This function causes the contents of the clipboard to be drawn in the clipboard viewer window (if any), by sending it a WM_DRAWCLIPBOARD message. This action occurs only if the clipboard data has changed.

The clipboard must be open before this function is invoked.

Example Code

This example closes the clipboard, previously opened by WinOpenClipbrd, to allow other applications to open it for use.

#define INCL_WINCLIPBOARD       /* Window Clipboard Functions   */
#include <os2.h>

BOOL  fSuccess;         /* success indicator                    */
HAB   hab;              /* anchor-block handle                  */

fSuccess = WinCloseClipbrd(hab);

Definition

#define INCL_WINCLIPBOARD /* Or use INCL_WIN, INCL_PM, */
#include <os2.h>

HAB     hab;  /*  Anchor-block handle. */
BOOL    rc;   /*  Success indicator. */

rc = WinCloseClipbrd(hab);

Related Functions

  • WinEmptyClipbrd
  • WinEnumClipbrdFmts
  • WinOpenClipbrd
  • WinQueryClipbrdData
  • WinQueryClipbrdFmtInfo
  • WinQueryClipbrdOwner
  • WinQueryClipbrdViewer
  • WinSetClipbrdData
  • WinSetClipbrdOwner
  • WinSetClipbrdViewer

Related Messages

  • WM_DRAWCLIPBOARD