|
Prev: VO programmer in CZ (praha)
Next: Connect with TCP/IP
From: Geoff Schaller on 16 Jul 2008 08:37 Yes it does but you have to know that in advance. To do that perhaps you can use the object model for Word or look up its API. So yes you can do this but you will have to look up the format. And then, only Word will read it. Paste it into notepad and what so you get? The trouble is the format. VO takes the very simplest approach. You need a much more sophisticated clipboard class. It was like what I said in my first post. You can get this in C# where it is much, much easier. Just type clipboard formats c# into google and you will see what I mean. If you want to know how to maintain multiple clipboard formats, go to this site: http://www.codeproject.com/KB/shell/clipboard01.aspx But this will give you severe depression when you find out how easy this is in Dot Net compared with VO. Perhaps the simple way out is to create a Class in C# and call it from your VO app? There are dozens of sites like this and many given you the info based on Dot net framework classes. Have fun. Geoff "J�rgen Knauf" <j.knauf(a)kp-software.de> wrote in message news:487ddd06$1(a)news.arcor-ip.de: > But how does Word manage the clipboard? > When I copy a RTF text snippet in MS Word into the clipboard, i can paste it > to every windows programm. > When I copy a RTF text snippet from my VO-App into the clipboard, I can only > paste it to windows programms that support RTF-Text. > > Somebody told me, that Word puts different formated copies of the text into > the clipboard, so that the windows program in which I want to paste the > clipboard, takes only the supported copy. > > Juergen > > > > "Geoff Schaller" <geoffx(a)softxwareobjectives.com.au> schrieb im Newsbeitrag > news:487ddb21(a)dnews.tpgi.com.au... > > > No, there is only one format at once. > > > > The applications that have multiple clipboards are actually managing that > > themselves but as far as an external application is concerned, there is > > only one format and it needs to know how to retrieve the data. You tell > > the receiving app that by setting the data content type. > > > > Geoff > > > > > > > > "J�rgen Knauf" <j.knauf(a)kp-software.de> wrote in message > > news:487dd58b$1(a)news.arcor-ip.de: > > > > >> Hi Geoff, > >> > >> do i get then two different Clipboard entries. > >> > >> Thats want I want: > >> I want to put a formated and unformated text to the clipboard, so that > >> this > >> texts can be pasted intto MS Word and into other Windowsprograms , which > >> do > >> only support plain text. > >> > >> When I only put RTF-formated text into Clipboard, I can only paste it > >> into > >> MS Word and Outlook, but not in notpad other applications. > >> > >> Juergen > >> > >> > >> > >> "Geoff Schaller" <geoffx(a)softxwareobjectives.com.au> schrieb im > >> Newsbeitrag > >> news:487dcd03$1(a)dnews.tpgi.com.au... > >> > > >> > Jurgen, > >> > > >> > The simplest way is to retrieve the current string, append to the > >> > string, > >> > separate items with a CRLF and put it back. > >> > > >> > oClipboard:RetreiveString() > >> > oCLipboard:Insert() > >> > > >> > Internally this is GetClipboarddata(1) but you can use the SDK code > >> > here > >> > to manipulate the contents. There are quite a few C# apps that go more > >> > into the API and it is a lot easier with Dot Net classes of course. See > >> > the API sdk for further info. Look at SetClipboardData() for the > >> > different > >> > formats possible. > >> > > >> > Geoff > >> > > >> > > >> > "J�rgen Knauf" <j.knauf(a)kp-software.de> wrote in message > >> > news:487dbc04$1(a)news.arcor-ip.de: > >> > > >> > > >> >> Hi, > >> >> > >> >> I want to copy a text into the clipboard, as a formated and as > >> >> unformated > >> >> text. > >> >> > >> >> How can I copy the text to the clipboard without clearing the old > >> >> content? > >> >> > >> >> Juergen > >> > >> > > > >
From: Alessandro Antonangeli on 16 Jul 2008 11:02 I was just courious and read just now. For what i read you can do it quite easily (but may be it doesnt work, never used it) 1) open the GUI sdk ClipBoard class 2) based on method InsertRTF() and Insert(), make your own one called ie InsertRTFAndText() 3) copy the stuff from both method InsertRTF() and Insert() 4) make sure you just call once at the beginning EmptyClipboard() If I well understood, you can put different data in the clipboard and retrieve them based on the kind of data you need (windows also provide conversion) let me know if it works (hope not to hang the pc <g>) -- Ciao Alessandro "J�rgen Knauf" <j.knauf(a)kp-software.de> ha scritto nel messaggio news:487dbc04$1(a)news.arcor-ip.de... > Hi, > > I want to copy a text into the clipboard, as a formated and as unformated > text. > > How can I copy the text to the clipboard without clearing the old content? > > Juergen > > >
From: Camille Kater on 16 Jul 2008 11:53 Hi J�rgen, In the clipboard there are 2 different types you can insert with VO: 1) a text string 2) a bitmap If you insert a text the Bitmap will not be deleted and vice versa if you insert a bitmap the text will not be deleted. There is no additionnal type to insert with VO. So you have to implement your own function to retrieve your text (see Geoff's reply). according to the help: ClipBoard:Insert() Method Purpose Insert text or a bitmap into the clipboard. Syntax <oClipBoard>:Insert(<cText> | <oBitmap>) ---> NIL Arguments <cText> | <oBitmap> The text or bitmap to insert in the clipboard. Description If you insert text, any text already in the clipboard is overwritten. However, text and bitmaps in the clipboard do not share the same space. If you insert a bitmap, no existing text is deleted; if you insert text, no existing bitmap is deleted. Camille J�rgen Knauf wrote: > Hi, > > I want to copy a text into the clipboard, as a formated and as > unformated text. > > How can I copy the text to the clipboard without clearing the old content? > > Juergen > > >
From: Jürgen Knauf on 16 Jul 2008 12:02 Allesandro, the problem is, you can only add additional formats to the clipboard but no data. I need a convertion in the clipboard from the rtf format to plain text. I have tried to change the SDK method "InsertRtf()" of the clipboard class and have added addional formats. But it doesn't work. ########## METHOD InsertRtf(cText) CLASS MyClipboard STATIC LOCAL dwId AS DWORD LOCAL hText AS PTR LOCAL pPTR AS PTR LOCAL dwLen AS DWORD // Get Clipboard format id for RTF. IF dwId == 0 dwId := RegisterClipboardFormat(PSZ("Rich Text Format")) ENDIF IF IsString(cText) .AND. dwId > 0 // Allocate global memory for transfer... dwLen := SLen(cText) hText := GlobalAlloc(_OR(GMEM_MOVEABLE,GMEM_DDESHARE), dwLen+1) // Put our string in the global memory... pPTR := GlobalLock(hText) IF ! OpenClipboard(NULL_PTR) .OR. (PTR(_CAST,pPTR) == NULL_PTR) GlobalFree(hText) RETURN SELF ENDIF EmptyClipboard() MemCopyString(pPTR,cText,dwLen) GlobalUnlock(hText) SetClipboardData(dwId, hText) //RTF SetClipboardData(CF_TEXT, hText) SetClipboardData(CF_OEMTEXT, hText) ... ... ############ Juergen "Alessandro Antonangeli" <alcati(a)alcati.RemoveThis.com> schrieb im Newsbeitrag news:g5l2ii$v0u$1(a)aioe.org... >I was just courious and read just now. > For what i read you can do it quite easily (but may be it doesnt work, > never used it) > > 1) open the GUI sdk ClipBoard class > 2) based on method InsertRTF() and Insert(), make your own one called ie > InsertRTFAndText() > 3) copy the stuff from both method InsertRTF() and Insert() > 4) make sure you just call once at the beginning EmptyClipboard() > > If I well understood, you can put different data in the clipboard and > retrieve them based on the kind of data you need (windows also provide > conversion) > > let me know if it works (hope not to hang the pc <g>) > > -- > Ciao > Alessandro > > > "J�rgen Knauf" <j.knauf(a)kp-software.de> ha scritto nel messaggio > news:487dbc04$1(a)news.arcor-ip.de... >> Hi, >> >> I want to copy a text into the clipboard, as a formated and as unformated >> text. >> >> How can I copy the text to the clipboard without clearing the old >> content? >> >> Juergen >> >> >> > >
From: Alessandro Antonangeli on 16 Jul 2008 14:43 Thats why I suggested to use the SDK. With ordinary function you can not But with API yes -- Ciao Alessandro "Camille Kater" <katercamXXX(a)pt.lu> ha scritto nel messaggio news:1216223624_23(a)vo.lu... > Hi J�rgen, > > In the clipboard there are 2 different types you can insert with VO: > 1) a text string > 2) a bitmap > > If you insert a text the Bitmap will not be deleted and vice versa if you > insert a bitmap the text will not be deleted. > There is no additionnal type to insert with VO. > So you have to implement your own function to retrieve your text (see > Geoff's reply). > > according to the help: > ClipBoard:Insert() Method > > Purpose > Insert text or a bitmap into the clipboard. > > Syntax > <oClipBoard>:Insert(<cText> | <oBitmap>) ---> NIL > > Arguments > > <cText> | <oBitmap> The text or bitmap to insert in the clipboard. > > Description > > If you insert text, any text already in the clipboard is overwritten. > However, text and bitmaps in the clipboard do not share the same space. > If you insert a bitmap, no existing text is deleted; if you insert text, > no existing bitmap is deleted. > > > Camille > > J�rgen Knauf wrote: >> Hi, >> >> I want to copy a text into the clipboard, as a formated and as unformated >> text. >> >> How can I copy the text to the clipboard without clearing the old >> content? >> >> Juergen >> >>
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: VO programmer in CZ (praha) Next: Connect with TCP/IP |