9#if !defined(OWL_CLIPBOAR_H)
13#if defined(BI_HAS_PRAGMA_ONCE)
41 void CloseClipboard();
44 operator bool()
const;
47 HWND GetOpenClipboardWindow()
const;
48 HWND GetClipboardOwner()
const;
49 HWND GetClipboardViewer()
const;
53 int CountClipboardFormats()
const;
54 bool IsClipboardFormatAvailable(
uint format)
const;
55 bool EmptyClipboard();
60#if defined(__OLE_H) || defined(_INC_OLE)
132inline TClipboard::TClipboard() {
139inline TClipboard::operator
bool()
const {
174 return ::GetClipboardData(Format);
183 return ::GetOpenClipboardWindow();
191 return ::GetClipboardOwner();
199 return ::GetClipboardViewer();
218 return ::GetPriorityClipboardFormat(
priorityList, count);
225 return ::CountClipboardFormats();
248 return ::IsClipboardFormatAvailable(
format);
256 return ::EmptyClipboard();
267 return ::RegisterClipboardFormat(
formatName.c_str());
283 return ::SetClipboardData(Format,Handle);
291 return ::SetClipboardViewer(Wnd);
294#if defined(__OLE_H) || defined(_INC_OLE)
308inline bool TClipboard::QueryCreate(
326inline bool TClipboard::QueryLink(
348inline TClipboardFormatIterator::operator
void* () {
349 return _Current ?
this :
nullptr;
The clipboard class encapsulates the methods for the clipboard object of Windows.
HWND GetClipboardViewer() const
Retrieves the handle of the first window in the Clipboard-view chain.
int GetClipboardFormatName(uint format, TCHAR *formatName, int maxCount) const
Retrieves the name of the registered format specified by format and copies the format to the buffer p...
int GetPriorityClipboardFormat(uint *priorityList, int count) const
Returns the first Clipboard format in a list.
static LPCTSTR DefaultProtocol
Points to a string that specifies the name of the protocol the client needs.
HANDLE SetClipboardData(uint format, HANDLE handle)
Copy the data onto the clipboard in the format.
HWND SetClipboardViewer(HWND hWnd) const
Adds the window specified by Wnd to the chain of windows that WM_DRAWCLIPBOARD notifies whenever the ...
HWND GetOpenClipboardWindow() const
Retrieves the handle of the window that currently has the Clipboard open.
int CountClipboardFormats() const
Returns a count of the number of types of data formats the Clipboard can use.
bool IsClipboardFormatAvailable(uint format) const
Indicates if the format specified in format exists for use in the Clipboard.
HWND GetClipboardOwner() const
Retrieves the handle of the window that currently owns the Clipboard, otherwise returns NULL.
bool EmptyClipboard()
Clears the Clipboard and frees any handles to the Clipboard's data.
HANDLE GetClipboardData(uint format) const
Retrieves data from the Clipboard in the format specified by format.The following formats are support...
uint RegisterClipboardFormat(const tstring &formatName) const
Registers a new Clipboard format.
TXClipboard creates the TXClipboard exception with a string resource.
TXOwl is root class of the ObjectWindows exception hierarchy.
Object Windows Library (OWLNext Core)
General definitions used by all ObjectWindows programs.
ObjectWindows exception class & function definitions.