Jump to content

WinEmptyClipbrd

From EDM2

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);

Related Functions