Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check if clipboard contains an image
Message
De
27/08/2005 12:06:36
 
 
À
27/08/2005 11:55:25
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01044544
Message ID:
01044552
Vues:
11
Thanks, Cetin, works great! Since I only need to check for an image, I added this function to my library
Function clipIsImage
  #define CF_BITMAP           2
  Declare short IsClipboardFormatAvailable in win32api integer cbformat
Return IsClipboardFormatAvailable(CF_BITMAP)#0
>>Hi all,
>>
>>I wonder if someone can tell me how to determine whether the clipboard contains an image. As far as I can see, this is not possible using VFP functions, but I guess there is a way via a GDI function or WinAPI.
>
>You can use something like this:
>
>*
>* Predefined Clipboard Formats - winuser.h
>*
>#define CF_TEXT             1
>#define CF_BITMAP           2
>#define CF_METAFILEPICT     3
>#define CF_SYLK             4
>#define CF_DIF              5
>#define CF_TIFF             6
>#define CF_OEMTEXT          7
>#define CF_DIB              8
>#define CF_PALETTE          9
>#define CF_PENDATA          10
>#define CF_RIFF             11
>#define CF_WAVE             12
>#define CF_UNICODETEXT      13
>#define CF_ENHMETAFILE      14
>#define CF_HDROP            15
>#define CF_LOCALE           16
>#define CF_MAX              17
>#define CF_OWNERDISPLAY     0x0080
>#define CF_DSPTEXT          0x0081
>#define CF_DSPBITMAP        0x0082
>#define CF_DSPMETAFILEPICT  0x0083
>#define CF_DSPENHMETAFILE   0x008E
>Declare short IsClipboardFormatAvailable in win32api integer cbformat
>? ( IsClipboardFormatAvailable(CF_BITMAP) # 0 )
>
Cetin
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform