Jump to content

WinEmptyClipbrd

From EDM2
Revision as of 22:47, 10 December 2023 by Martini (talk | contribs) (Martini moved page WinEmptyClipBrd to WinEmptyClipbrd without leaving a redirect)

This function empties the clipboard, removing and freeing all handles to data that is in the clipboard.

Syntax

WinEmptyClipbrd(hab)

Parameters

hab (HAB) - input
Anchor-block handle.


Returns

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

Remarks

The clipboard must be opened using WinOpenClipbrd before using this function.

This function will send a WM_DESTROYCLIPBOARD message to the clipboard owner.

Example Code

This example empties the clipboard (opened by WinOpenClipbrd), removing and freeing all handles to data in the clipboard.

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

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


fSuccess = WinOpenClipbrd(hab);

if (fSuccess)
   fSuccess = WinEmptyClipbrd(hab);

Definition

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

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

rc = WinEmptyClipbrd(hab);

Related Functions