[DUG] Copy WideString to the clipboard

Gary T. Benner gary at benner.co.nz
Mon Sep 10 09:48:13 NZST 2007


[Reply]

Hi Csaba,

Check out this Unicode editor that has it all ...

http://www.soft-gems.net:8080/browse/~raw,r=116/library/UniCodeEditor/Source/UniCodeEditor.pas

cheers

Gary


At 04:32 on 10/09/2007 you wrote 
>To  : delphi at delphi.org.nz
>CC  : >From: Csaba Gajo, csaba at enyem.com
>Content Type: text/plain
>Attached: >
>Hi everyone!
>
>I need to copy some text to the clipboard, using the TClipboard object. If  >I use the old-fashioned way, I would do it like this:
>
>clp := TClipboard.Create;
>clp.SetTextBuf(PChar(MyText.Text));
>clp.Free;
>
>However, if I use Unicode components I will have to deal with WideString  >and PWideChar. If I try to do
>
>clp.SetTextBuf(PWideChar(MyText.Text));
>
>I will get an error because the Clipboard expects an ordinary PChar.
>So how can I copy Unicode text to the clipboard?
>
>I'm using Delphi 5 btw.
>
>Thanks, Csaba
>
>
>_______________________________________________
>NZ Borland Developers Group - Delphi mailing list
>Post: delphi at delphi.org.nz
>Admin: http://delphi.org.nz/mailman/listinfo/delphi
>Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject: unsubscribe
>

Ref#: 41006

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.adventureeducation.co.nz/pipermail/delphi/attachments/20070910/fdc537f8/attachment.html


More information about the Delphi mailing list