Programma di esempio CLIPBOARD.PRT
; CLIPBOARD
;
; Programma per Proteus
;
; (C) 2004 Simone Zanella Productions
;
; Questo programma enumera i formati nella clipboard e stampa il contenuto (se è rappresentabile come testo).
; Inoltre, all'uscita imposta la clipboard al testo "Ciao, mondo!".

#!proteus -z

CONST CF_TEXT             1
CONST CF_BITMAP           2
CONST CF_METAFILEPICT     3
CONST CF_SYLK             4
CONST CF_DIF              5
CONST CF_TIFF             6
CONST CF_OEMTEXT          7
CONST CF_DIB              8
CONST CF_PALETTE          9
CONST CF_PENDATA          10
CONST CF_RIFF             11
CONST CF_WAVE             12
CONST CF_UNICODETEXT      13
CONST CF_ENHMETAFILE      14
CONST CF_HDROP            15
CONST CF_LOCALE           16
CONST CF_MAX              17
CONST CF_OWNERDISPLAY     0x0080
CONST CF_DSPTEXT          0x0081
CONST CF_DSPBITMAP        0x0082
CONST CF_DSPMETAFILEPICT  0x0083
CONST CF_DSPENHMETAFILE   0x008E
CONST CF_PRIVATEFIRST     0x0200
CONST CF_PRIVATELAST      0x02FF
CONST CF_GDIOBJFIRST      0x0300
CONST CF_GDIOBJLAST       0x03FF

;ProteusSetClipboard(type, data)
;ProteusGetClipboardSize(type)
;ProteusGetClipboard(type)
;ProteusEnumClipboardFormats(lasttype)

!extern SetClipboard, PROTEXT.DLL, ProteusSetClipboard, 2, 0
!extern GetClipboardSize, PROTEXT.DLL, ProteusGetClipboardSize, 1, 0
!extern GetClipboard, PROTEXT.DLL, ProteusGetClipboard, 1, 32768
!extern EnumClipboardFormats, PROTEXT.DLL, ProteusEnumClipboardFormats, 1, 0

LASTTYPE = EnumClipboardFormats(0)
CONSOLELN "Formato dei dati nella clipboard:"
WHILE NEQ(LASTTYPE, 0)
  N = GetClipboardSize(LASTTYPE)
  CONSOLELN "-- Formato: " LASTTYPE " (dim. " N " bytes)"
  IF EQ(LASTTYPE, CF_TEXT)
    CONSOLELN "---- Contenuto: " GetClipboard(LASTTYPE)
  FI
  LASTTYPE = EnumClipboardFormats(LASTTYPE)
LOOP

CONSOLELN "Imposto la clipboard a \"Ciao, mondo!\".."
SetClipboard(CF_TEXT, "Ciao, mondo!")
CONSOLELN "Fatto."

ABORT 0
Indice esempi Prossimo esempio Esempio precedente Indice per argomenti Indice analitico
Midnight Lake iPhone Case Black Women Shoes Black Flat Shoes Leather Flats Black Patent Ballerinas Black Ballet Shoes Casual Shoes Black Shoes Women Balle Record Player Cufflinks Best iPhone XR Clear Cases iPhone XS/XS Max Leather Cases Sale Best iPhone 8/8 Plus Silicone Cases iPhone 7/7 Plus Cases & Screen Protector New Cases For iPhone 6/6 Plus iPhone 8 Case Sale iPhone Xr Case Online iPhone 7 Case UK Online iPhone X Case UK Sale iPhone X Case Deals iPhone Xs Case New Case For iPhone Xr UK Online Case For iPhone 8 UK Outlet Fashion Silver Cufflinks For Men Best Mens Cufflinks Outlet Online The Gold Cufflinks Shop Online Cheap Shirt Cufflinks On Sale Nice Wedding Cufflinks UK Online Top Black Cufflinks UK Online Mens Cufflinks Online Silver Cufflinks For Men Men Cufflinks UK Sale Gold Cufflinks UK Online Gold Cufflinks UK Silver Cufflinks UK Shirt Cufflinks Discount Online Mens Cufflinks Deals & Sales Girls Shoes For Dance Fashion Ballet Dance Shoes Best Ballet Flats Shoes UK Online Cheap Ballet Pointe Shoes UK Online Best Ballet Shoes Outlet Best Dance Shoes Sale Cheap Ballet Flats Sale UK Best Pointe Shoes Online UK Ballet Dance Shoes UK Shoes For Dance UK Best Ballet Slippers Shop Best Yoga Shoes Hotsell