OL_WinCBCopy() Get text from the MS Windows clipboard. ──────────────────────────────────────────────────────────────────────────────
Syntax
OL_WinCBCopy() --> cText
Arguments
None.
Returns
The text contents of the Windows clipboard if there is any text there, or an empty string if there was an error or there was no text in the clipboard.
Description
OL_WinCBCopy() can be used to retrieve text from the Windows clipboard when your application is running in a DOS window.
If for any reason the function is unable to locate any text in the clipboard the function will return an empty string. For the function to fail to copy from the clipboard one of the following has to happen:
a) The application is not running under MS Windows. b) The DOS paste service is not available. c) The clipboard could not be opened.
This function has been tested under under WFWG 3.11 and Windows 95.
NOTE: Because this function needs to do some extra stuff when your application is running in protected mode I've had to make use of the CPMI library. You must link this in if you intend to use this function, even if you are linking for real mode operation.
Examples
// Attempt to grab some text from the clipboard and display it.
If OL_IsWin() ? "The content is '" + OL_WinCBCopy() + "'" Else ? "You are not running under Windows" EndIf