- This topic has 17 replies, 4 voices, and was last updated 10 years ago by Admin.
-
AuthorPosts
-
November 20, 2014 at 4:05 pm #186474ChikeMember
yeah I see that, but logic dictates that if there is no Roomlist(dlgId) then its a pm window else it must be a room.
btw I found a nice little delphi sample on streaming RTF text to other applications, it not too far off what we use now but there is some intersting flags and callbacks
It is in Delphi but im sure you will no problems understanding it..
the only I need to check out for the shared memory part is the reference to “CommonMemoryUnit” its not a default unit in delphi
Bothe the code and data need to be in the other application, I’ve posted it long time ago
November 21, 2014 at 12:14 am #186473DepartureMemberI do remember that code you posted now that you mentioned it. I have tried the code I posted on paltalk and it works very good, but for me personally I don’t see the need for the overhead as my current method does the job, Currently I have to convert the rtf to a simple memory stream to keep the formatting when sending to paltalk, then I can use the standard WM_SETTEXT to actually send the formatted text.
procedure TPalWindow.SendPalRTF(aRichEdit: TRichedit); var memStream: TMemoryStream; strList: TStringList; begin memStream := TMemoryStream.Create; strList := TStringList.Create; try memStream.Clear; aRichEdit.Lines.SaveToStream(memStream); memStream.Position := 0; strList.Clear; strList.LoadFromStream(memStream); SendText(AnsiString(strList.Text)); finally memStream.Free; strList.Free; end; end;
November 21, 2014 at 7:21 am #186472ChikeMemberI do remember that code you posted now that you mentioned it. I have tried the code I posted on paltalk and it works very good, but for me personally I don’t see the need for the overhead as my current method does the job, Currently I have to convert the rtf to a simple memory stream to keep the formatting when sending to paltalk, then I can use the standard WM_SETTEXT to actually send the formatted text.
My code was to stream the text from pal not to pal to preserve the text the user entered without using the clipboard.
The code you have posted does not stream the text to the other application and I’m not sure WM_SETTEXT will work by default with every application. -
AuthorPosts
Related
- You must be logged in to reply to this topic.