Clipboard Functions
Clipboard Functions
Clipboard Functions
CLP_CountFormats(): Counts the number of different data formats available in the clipboard.
Alias
CountClipboardFormats()
Syntax
CLP_CountFormats() è nFormatCount
Parameters
None.
Returns
nFormatCount number of data formats available in the clipboard.
Example
IF ( CLP_CountFormats() == 0 )
? "No data available in the clipboard"
ENDIF
CLP_empty(): Clears the Windows clipboard.
Syntax
CLP_empty() è lSuccess
Parameters
None.
Returns
lSuccess .T. if operation was successful; .F. otherwise.
CLP_GetText(): Gets text from Windows clipboard.
Remark
The CLP_GetText() function is similar to query the _CLIPTEXT internal variable of Visual FoxPro.
Syntax
CLP_GetText() è szText
Parameters
None.
Returns
szText text that was stored into the Windows clipboard.
CLP_IsFormatAvailable(): Determines whether the clipboard contains data in the specified format.
Alias
IsClipboardFormatAvailable()
Syntax
CLP_IsFormatAvailable( nFormat ) è lAvailable
Parameters
nFormat specifies a standard or registered clipboard format.
CF_BITMAP / 2 / A handle to a bitmap (HBITMAP).
CF_METAFILEPICT / 3 / Handle of a metafile picture format as defined by the METAFILEPICT structure. When passing a CF_METAFILEPICT handle by means of dynamic data exchange (DDE), the application responsible for deleting hMem should also free the metafile referred to by the CF_METAFILEPICT handle.
CF_SYLK / 4 / Microsoft Symbolic Link (SYLK) format.
CF_DIF / 5 / Software Arts' Data Interchange Format.
CF_TIFF / 6 / Tagged-image file format.
CF_OEMTEXT / 7
CF_DIB / 8 / A memory object containing a BITMAPINFO structure followed by the bitmap bits.
CF_PALETTE / 9 / When displaying clipboard data, Windows clipboard always uses as its current palette any object on the clipboard that is in the CF_PALETTE format
CF_PENDATA / 10 / Data for the pen extensions to the Microsoft Windows for Pen Computing.
CF_RIFF / 11 / Represents audio data more complex than can be represented in a CF_WAVE standard wave format.
CF_WAVE / 12 / Represents audio data in one of the standard wave formats, such as 11 kHz or 22 kHz pulse code modulation (PCM).
CF_UNICODETEXT / 13 / Windows NT only: Unicode text format. Each line ends with a carriage return/linefeed (CR-LF) combination. A null character signals the end of the data.
CF_ENHMETAFILE / 14 / A handle of an enhanced metafile (HENHMETAFILE).
CF_HDROP / 15 / A handle of type HDROP that identifies a list of files. An application can retrieve information about the files by passing the handle to the DragQueryFile functions.
CF_LOCALE / 16 / The data is a handle to the locale identifier associated with text in the clipboard. When you close the clipboard, if it contains CF_TEXT data but no CF_LOCALE data, the system automatically sets the CF_LOCALE format to the current input locale. You can use the CF_LOCALE format to associate a different locale with the clipboard text. An application that pastes text from the clipboard can retrieve this format to determine which character set was used to generate the text. Note that the clipboard does not support plain text in multiple character sets. To achieve this, use a formatted text data type such as RTF instead. Windows NT: The system uses the code page associated with CF_LOCALE to implicitly convert from CF_TEXT to CF_UNICODETEXT. Therefore, the correct code page table is used for the conversion.
Returns
lAvailable .T. if the specified format is available; .F. otherwise.
CLP_LastVersion(): Returns the file stamp of CLP functions.
Remark
This function helps the developer identifying the last version of a set of functions. Sometimes the global version information of FOCUS.FLL (MIS_major() and MIS_minor()) does not help tracking down the changes in a project. Starting with version 6.0 of FOCUS.FLL, each source file has now an internal date and time stamp.
Syntax
CLP_LastVersion() è szLastVersion
Parameters
None.
Returns
szLastVersion if a string identifying the last version of the BMP functions. The string is similar to "C:\Focus\5.0\CLP.C-Mon Oct 19 15:55:22 1998".
CLP_SetText(): sets text into the Windows clipboard.
Remark
The CLP_SetText() function is similar to assign the _CLIPTEXT internal variable of Visual FoxPro.
Syntax
CLP_SetText( szText ) è lSuccess
Parameters
szText text to store into the Windows clipboard.
Returns
lSuccess .T. successful operation; .F. if not.