RTF to clipboard

This forum is for general support of Xbase++
Post Reply
Message
Author
User avatar
Tom
Posts: 1171
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

RTF to clipboard

#1 Post by Tom »

Hi, there.

I'm trying to copy a formatted RTF-text to the clipboard, so it can be pasted into a word processor "as is", with all formatting options. If I copy the formatted text using the standard method (oClipBoard:SetBuffer(cRtfText)), I receive a plain text with all formatting options ({\rtf ...). There must be a way to set the clipboard format to RTF, but I failed using RegisterFormat(). I even scanned all registered formats (using oClipBoard:GetFormatName()) and tried everything containing "RTF" or "Rich Text", but in this situation, just nothing was copied. This must be possible, but there's no constant inside XBP.CH for it. Any ideas?
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
Auge_Ohr
Posts: 1407
Joined: Wed Feb 24, 2010 3:44 pm

Re: RTF to clipboard

#2 Post by Auge_Ohr »

hi,

as i wrote in German Xbase-Forum try XbpRTF()
use Property :SelRTF or :TextRTF and for "copy"

Code: Select all

METHOD MyRtf:Copy()
   SendMessageA( ::GetHWND(), WM_COPY, 0, 0 )
RETURN SELF
greetings by OHR
Jimmy

Post Reply