Jump to content

WinOpenClipbrd: Difference between revisions

From EDM2
Created page with "This function opens the clipboard. ==Syntax== WinOpenClipbrd(hab) ==Parameters== ;hab (HAB) - input :Anchor-block handle. ;rc (BOOL) - returns :Success indicator. :;TRUE..."
 
m Martini moved page WinOpenClipBrd to WinOpenClipbrd
(No difference)

Revision as of 22:49, 10 December 2023

This function opens the clipboard.

Syntax

WinOpenClipbrd(hab)

Parameters

hab (HAB) - input
Anchor-block handle.
rc (BOOL) - returns
Success indicator.
TRUE
Clipboard successfully opened
FALSE
Error occurred.

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

Definition

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

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

rc = WinOpenClipbrd(hab);

Related Functions