Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Clearing the clipboard from VFP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00768536
Message ID:
00768868
Vues:
22
I just tested this part.

First I have selected a fragment of an HTML page and copied it to the clipboard. Enumerating of available clipboard formats returned:
* 49161 Data Object
*     1 Text Format
*    13 Unicode Text
* 49352 HTML Format
* 49398 Rich Text Format
* 49171 Ole Private Data
*    16 Locale Identifier handle
*     7 Text format with OEM charset
Step 2:
_CLIPTEXT = ""
After that enumerating of available clipboard formats returned:
*    1 Text Format
*   13 Unicode Text
*   16 Locale Identifier handle
*    7 Text format with OEM charset
So the clipboard was not exactly empty, but it contained an empty string.

And only after running the following code:
DECLARE INTEGER EmptyClipboard IN user32
DECLARE INTEGER GetActiveWindow IN user32
DECLARE INTEGER CloseClipboard IN user32
DECLARE INTEGER OpenClipboard IN user32 INTEGER hwnd
     
IF OpenClipboard(GetActiveWindow()) <> 0
	= EmptyClipboard()
	= CloseClipboard()
ENDIF
the clipboard is really empty, no handles inside. Certainly in most cases it is not important whether the clipboard is empty or contains an empty string.

The following are Win API functions I used to enumerate available clipboard formats:
DECLARE INTEGER EnumClipboardFormats IN user32 INTEGER wFormat
DECLARE INTEGER OpenClipboard   IN user32 INTEGER hwnd
DECLARE INTEGER CloseClipboard  IN user32

DECLARE INTEGER GetClipboardFormatName IN user32;
	INTEGER format, STRING @lpszFormatName,;
	INTEGER cchMaxCount
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform