Jump to content

WinCloseClipbrd: Difference between revisions

From EDM2
Created page with "This function closes the clipboard, allowing other applications to open it with the WinOpenClipbrd function. ==Syntax== WinCloseClipbrd(hab) ==Parameters== ; hab (HAB) - i..."
 
Ak120 (talk | contribs)
mNo edit summary
Line 1: Line 1:
This function closes the clipboard, allowing other applications to open it with the WinOpenClipbrd function.  
This function closes the clipboard, allowing other applications to open it with the [[WinOpenClipbrd]] function.


==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.
:Success indicator.
::TRUE :Successful completion
:;TRUE
::FALSE :Error occurred.
::Successful completion  
:;FALSE
::Error occurred.


==Remarks==
==Remarks==
This function causes the contents of the clipboard to be drawn in the clipboard viewer window (if any), by sending it a WM_DRAWCLIPBOARD message. This action occurs only if the clipboard data has changed.
This function causes the contents of the clipboard to be drawn in the clipboard viewer window (if any), by sending it a WM_DRAWCLIPBOARD message. This action occurs only if the clipboard data has changed.


The clipboard must be open before this function is invoked.  
The clipboard must be open before this function is invoked.


==Example Code==
==Example Code==
This example closes the clipboard, previously opened by WinOpenClipbrd, to allow other applications to open it for use.  
This example closes the clipboard, previously opened by WinOpenClipbrd, to allow other applications to open it for use.
<pre>
<pre>
#define INCL_WINCLIPBOARD      /* Window Clipboard Functions  */
#define INCL_WINCLIPBOARD      /* Window Clipboard Functions  */
Line 31: Line 27:


fSuccess = WinCloseClipbrd(hab);
fSuccess = WinCloseClipbrd(hab);
</pre>
Definition
<pre>
#define INCL_WINCLIPBOARD /* Or use INCL_WIN, INCL_PM, */
#include <os2.h>
HAB    hab;  /*  Anchor-block handle. */
BOOL    rc;  /*  Success indicator. */
rc = WinCloseClipbrd(hab);
</pre>
</pre>


Line 54: Line 39:
* WinSetClipbrdData
* WinSetClipbrdData
* WinSetClipbrdOwner
* WinSetClipbrdOwner
* WinSetClipbrdViewer  
* WinSetClipbrdViewer


==Related Messages==
==Related Messages==
* WM_DRAWCLIPBOARD  
* WM_DRAWCLIPBOARD


[[Category:Win]]
[[Category:Win]]

Revision as of 20:49, 21 November 2023

This function closes the clipboard, allowing other applications to open it with the WinOpenClipbrd function.

Syntax

WinCloseClipbrd(hab)

Parameters

hab (HAB) - input
Anchor-block handle.

Returns

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

Remarks

This function causes the contents of the clipboard to be drawn in the clipboard viewer window (if any), by sending it a WM_DRAWCLIPBOARD message. This action occurs only if the clipboard data has changed.

The clipboard must be open before this function is invoked.

Example Code

This example closes the clipboard, previously opened by WinOpenClipbrd, to allow other applications to open it for use.

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

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

fSuccess = WinCloseClipbrd(hab);

Related Functions

  • WinEmptyClipbrd
  • WinEnumClipbrdFmts
  • WinOpenClipbrd
  • WinQueryClipbrdData
  • WinQueryClipbrdFmtInfo
  • WinQueryClipbrdOwner
  • WinQueryClipbrdViewer
  • WinSetClipbrdData
  • WinSetClipbrdOwner
  • WinSetClipbrdViewer

Related Messages

  • WM_DRAWCLIPBOARD