WinOpenClipbrd: Difference between revisions
Appearance
m Martini moved page WinOpenClipBrd to WinOpenClipbrd |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
This function opens the clipboard. | This function opens the clipboard. | ||
==Syntax== | ==Syntax== | ||
Line 5: | Line 5: | ||
==Parameters== | ==Parameters== | ||
;hab (HAB) - input | ;hab (HAB) - input:Anchor-block handle. | ||
:Anchor-block handle. | |||
==Returns== | ==Returns== | ||
;rc (BOOL) - returns | ;rc (BOOL) - returns:Success indicator. | ||
::TRUE - Clipboard successfully opened | |||
: | ::FALSE - Error occurred. | ||
: | |||
==Remarks== | ==Remarks== | ||
The process reading the clipboard does not become the owner of the object in it; it must not update or free the object. | The process reading the clipboard does not become the owner of the object in it; it must not update or free the object. | ||
Line 28: | Line 19: | ||
If another thread or process already has the clipboard open, this function does not return until the clipboard is closed. | If another thread or process already has the clipboard open, this function does not return until the clipboard is closed. | ||
Messages can be received from other threads and processes during the processing of this function. | Messages can be received from other threads and processes during the processing of this function. | ||
==Example Code== | ==Example Code== | ||
This example opens the clipboard for use by the current process. | This example opens the clipboard for use by the current process. | ||
Line 39: | Line 31: | ||
fSuccess = WinOpenClipbrd(hab); | fSuccess = WinOpenClipbrd(hab); | ||
</pre> | </pre> | ||
Latest revision as of 03:02, 12 December 2023
This function opens the clipboard.
Syntax
WinOpenClipbrd(hab)
Parameters
- hab (HAB) - input
- Anchor-block handle.
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE - Clipboard successfully opened
- FALSE - Error occurred.
Remarks
The process reading the clipboard does not become the owner of the object in it; it must not update or free the object.
This function prevents other threads and processes from examining or changing the clipboard contents.
If another thread or process already has the clipboard open, this function does not return until the clipboard is closed.
Messages can be received from other threads and processes during the processing of this function.
Example Code
This example opens the clipboard for use by the current process.
#define INCL_WINCLIPBOARD /* Window Clipboard Functions */ #include <os2.h> BOOL fSuccess; /* success indicator */ HAB hab; /* anchor-block handle */ fSuccess = WinOpenClipbrd(hab);