GUI ScreenIO for Windows

 ScreenIO.com


Clipboard Functions

This API lets you use the Windows Clipboard to copy and paste data.  We use this function in the panel editor to copy and paste controls, for example.

Client/Server issues

No issues; this API will behave as if it were running locally on the client. 

Files

Files available to copy to your system:

Functions

FUNC-CLIPBOARD-GET

Copies data from the clipboard to CLIPBOARD-DATA

FUNC-CLIPBOARD-PUT

Copies data from CLIPBOARD-DATA to  the clipboard

FUNC-CLIPBOARD-TEST

Tests to see if the clipboard contains data of the specified format

Usage

     COPY WIN32API.
     COPY CLIPBORD.

* ------------------------: Call the API.

     SET FUNC-CLIPBOARD-PUT TO TRUE.

     CALL 'GSWINAPI' USING WIN32API-PARMS
                           CLIPBOARD-PARMS
                           clipboard-data
                           WIN32API-C
                           WIN32API-D
                           WIN32API-E
                           WIN32API-F.

Parameters specific to this function

CLIPBOARD-HWND

Window handle of the owner panel; use panel-HWND of one of your panels.

CLIPBOARD-FORMAT

Name of this type of data; use this to identify the type of data you're placing in the clipboard.  The choice of name is arbitrary.

CLIPBOARD-BUFFER-SIZE

For GET:  Size (in bytes) of the buffer you're providing to receive the clipboard data. 

For PUT:  Number of bytes of data you want to write to the clipboard.

CLIPBOARD-BYTES-RETURNED

For GET:  Number of bytes returned to your program; if your buffer was not large enough,  number of bytes required.

clipboard-data

This represents a block of storage in your program.  It may be of any size, since the clipboard routine allocates storage dynamically to contain the data you place in the clipboard.

For GET:  Buffer to receive data from the clipboard.

For PUT:  Buffer containing data you want to copy to the clipboard.

WIN32API-PARMS - Used in all GSWINAPI calls

This argument is standard for all CALLs to GSWINAPI. It is used to select the desired API or function, and to return the status of the operation.

WIN32API-RC

Used to return the status of a call to GSWINAPI.  A value of zero is a failure, any other value indicates success.

Recommended usage is to test the 88-level value WIN32API to see if it worked, then to use the text error message to see why it failed.

* ------------------------: If function failed,
*                         :   display the error in a message box.
*
     IF WIN32API-FAILED
       MOVE WIN32API-ERROR-TEXT TO panel-MESSAGE-TEXT
       SET panel-MESSAGE-IN-MESSAGEBOX TO TRUE.

WIN32API-ERROR-CODE

Error code that was returned by Windows.  This is not generally useful unless you have the Windows Platform SDK documentation available to you.

WIN32API-ERROR-TEXT

Plain-text error message that describes why the operation failed.

WIN32API-A through WIN32API-F

The number of these present varies depending on how many arguments are used by the desired function.  These are not used, but must be present because this CALL requires seven arguments.


© 2000-2019 Norcom, all rights reserved 

TOC

Send feedback to Norcom