Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy Unicode to clipboard
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01414441
Message ID:
01414700
Vues:
61
Hi Sergey,

Thanks for your replay.

I tried a "native copy and paste" and then ran your code. I got
1      1
2     16
3      7
4     13
Then I tried your "copy unicode" routine and then ran your code again. I got
1     13
2     16
3      1
4      7
Will this information helpful in solving the problem?

Ben

>>I use the Sergey's code (http://www.berezniker.com/content/pages/visual-foxpro/copy-unicode-text-clipboard) to copy Chinese text to clipboard as follows.
CopyUnicodeText2Clipboard(StrConv(_Cliptext,5))
>>When I paste the text into Excel, it is okay. However if I paste the text into VFP, the text becomes question marks.
>>
>>Is it possible to make it work in both applications (Excel & VFP)?
>
>What do you have in clipboard before an after?
>
>CLEAR
>
>* Get list of files from Clipboard
>DECLARE Long OpenClipboard IN USER32 Long hWndNewOwner
>DECLARE Long CloseClipboard IN USER32
>DECLARE Long EmptyClipboard IN USER32
>
>DECLARE Long GetClipboardData IN USER32 Long lnFormat
>DECLARE Long EnumClipboardFormats IN USER32 Long lnFormat
>
>* open clipboard
>lnResult = OpenClipboard(_SCREEN.hWnd)
>
>*= EmptyClipboard()
>
>* Enumerate the file formats in the clipboard.
>* Helpful for testing, otherwise is not required.
>lnFormat = 0
>lnFormat = EnumClipboardFormats(lnFormat)
>lnCntr = 1
>DO WHILE lnFormat > 0
>	? lnCntr, lnFormat
>	lnCntr = lnCntr + 1
>	lnFormat = EnumClipboardFormats(lnFormat)
>ENDDO
>
>= CloseClipboard()
>
>
>* Predefined Clipboard Formats
>
>#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_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
>
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform