WinEmptyClipbrd: Difference between revisions
Appearance
mNo edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
==Parameters== | ==Parameters== | ||
;hab (HAB) - input:Anchor-block handle. | ;''hab'' (HAB) - input:Anchor-block handle. | ||
==Returns== | ==Returns== | ||
;rc (BOOL) - returns:Success indicator. | ;''rc'' (BOOL) - returns:Success indicator. | ||
::TRUE - Successful completion | ::TRUE - Successful completion | ||
::FALSE - Error occurred. | ::FALSE - Error occurred. |
Latest revision as of 19:03, 10 April 2025
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);