Information générale
Catégorie:
Contrôles ActiveX en VFP
Dragan, thanks.
>>James, Dragan,
>>
>>Thanks for the reply to all of you.
>>
>>I cannot use "any text you like" because I need to get it from clipboard. And _cliptext does not work giving ?????? characters or inproper character set representation.
>>
>>Only CTRL+V works, but in manual mode only. Therefore I posted the question.
>>
>>Finally I gave up and used editbox and underlying temporary table with binary memofield. Then I was able to insert into table values (_cliptext) and display text properly in the editbox.
>>Interesting enough binary character field does not work properly here.
>>
>>Though solution seems is found, still it would be good to have answers to two questions:
>>- how to paste into RTF control programmatically, and
>>- why binary character field does not work here the same way as binary memo field.
>
>It seems to depend on the format of the data on clipboard. You may look at the few functions in FoxTools, namely GetClipDat() and GetClipFmt(), OpenClip() etc - you may use them to retrieve your clipboard data in a format which will be compatible with the RTF control.
>
>I've tried using directly _cliptext with content copied from a web browser (Mozilla) and a spreadsheet (OppenOffict), and it carried the usual text-only content. If you're seeing any codepage things happening, that's probably because VFP's _clipboard has the text version of the data translated automatically into current codepage, or not translated at all. If the original content is Unicode on the Windows clipboard, I think this automatic conversion is doing a very bad job.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement