Jump to content

WinQueryClipbrdViewer: Difference between revisions

From EDM2
Created page with "This function obtains any current clipboard viewer window. ==Syntax== WinQueryClipbrdViewer( ''hab'' ) ==Parameters== ;hab (HAB) - input :Anchor-block handle. ==Returns=..."
 
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This function obtains any current clipboard viewer window.  
This function obtains any current clipboard viewer window.
 
==Syntax==
==Syntax==
  WinQueryClipbrdViewer( ''hab'' )
  WinQueryClipbrdViewer( ''hab'' )


==Parameters==  
==Parameters==
;hab (HAB) - input
;''hab'' (HAB) - input:Anchor-block handle.
:Anchor-block handle.  


==Returns==
==Returns==
;hwndClipbrdViewer (HWND) - returns
;''hwndClipbrdViewer'' (HWND) - returns:Current clipboard viewer window handle.
:Current clipboard viewer window handle.
::NULLHANDLE: Clipboard does not have a current viewer window, or an error occurred
:;NULLHANDLE
::Other: Current clipboard viewer window handle.
::Clipboard does not have a current viewer window, or an error occurred  
:;Other
::Current clipboard viewer window handle.  


==Example Code==
==Example Code==
Definition:
<pre>
#define INCL_WINCLIPBOARD /* Or use INCL_WIN, INCL_PM, */
#include <os2.h>
HAB    hab;                /*  Anchor-block handle. */
HWND    hwndClipbrdViewer;  /*  Current clipboard viewer window handle. */
hwndClipbrdViewer = WinQueryClipbrdViewer(hab);
</pre>
This example finds out which window currently owns the clipboard.
This example finds out which window currently owns the clipboard.
<pre>
<pre>
#define INCL_WINCLIPBOARD
#define INCL_WINCLIPBOARD
#include <OS2.H>
#include <os2.h>
HAB hab;
HAB hab;
/* . */
/* . */
HWND  hwndClipbrdViewer;
HWND  hwndClipbrdViewer;


hwndClipbrdViewer = WinQueryClipbrdViewer(hab);
hwndClipbrdViewer = WinQueryClipbrdViewer(hab);
</pre>
</pre>


Line 50: Line 35:
* [[WinSetClipbrdOwner]]
* [[WinSetClipbrdOwner]]
* [[WinSetClipbrdViewer]]
* [[WinSetClipbrdViewer]]
[[Category:Gpi]]
 
[[Category:Win]]

Latest revision as of 19:12, 10 April 2025

This function obtains any current clipboard viewer window.

Syntax

WinQueryClipbrdViewer( hab )

Parameters

hab (HAB) - input
Anchor-block handle.

Returns

hwndClipbrdViewer (HWND) - returns
Current clipboard viewer window handle.
NULLHANDLE: Clipboard does not have a current viewer window, or an error occurred
Other: Current clipboard viewer window handle.

Example Code

This example finds out which window currently owns the clipboard.

#define INCL_WINCLIPBOARD
#include <os2.h>
HAB hab;
/* . */
HWND  hwndClipbrdViewer;

hwndClipbrdViewer = WinQueryClipbrdViewer(hab);

Related Functions