Silverfrost Logo About Us | Contact Us
 

COPY_FROM_CLIPBOARD@

Platform

Win32(ClearWin+)

Purpose

To copy data from the clipboard.

Syntax

INTEGER FUNCTION COPY_FROM_CLIPBOARD@( BUFFER, NUM, TYPE )
CHARACTER*(*)  BUFFER
INTEGER NUM, TYPE

Description

Use this routine to copy anything from the clipboard. The following data types can exist in the clipboard, though not all are directly supported by Clearwin+:

 

 

CF_BITMAP

Bitmap data

 

CF_DIB

A BITMAPINFO structure followed by a bitmap

 

CF_DIF

Data interchange format

 

CF_DSPBITMAP

Private data stored in a bitmap format

 

CF_DSPMETAFILEPICT

Private data stored in metafile format

 

CF_DSPTEXT

Private data stored in text format

 

CF_METAFILEPICT

The data is in metafile format

 

CF_OEMTEXT

The data is in OEM text format

 

CF_OWNERDISPLAY

The data is a private format

 

CF_PALETTE

A palette

 

CF_RIFF

Resource interchange format

 

CF_SYLK

Microsoft symbolic link format

 

CF_TEXT

Text format

 

CF_TIFF

Tag image file format

 

CF_WAVE

Wave format


 

 

The BUFFER will contain NUM bytes copied from the clipboard. To determine the length of CF_TEXT or CF_OEMTEXT the routine SIZEOF_CLIPBOARD_TEXT@ can be called.

Return value

Returns 1 for success or zero for failure.

See also

COPY_TO_CLIPBOARD@, CLIPBOARD_TO_SCREEN_BLOCK@, SIZEOF_CLIPBOARD_TEXT@

Example

INTEGER addr,len,i
CHARACTER buffer*1024
len=sizeof_clipboard_text@()
IF(len.GT.0)THEN
  CALL get_storage@(addr,len)
  IF(addr.GT.0)THEN
    i=copy_from_clipboard@(addr,len, CF_TEXT)
    CALL move@(buffer,CCORE1(addr),len)
  ENDIF
ENDIF


 

 

Copyright © 1999-2017 Silverfrost Limited