Recent

Author Topic: TRichMemo.SaveRichText Win64 ?  (Read 3466 times)

gillesfr14

  • Newbie
  • Posts: 6
TRichMemo.SaveRichText Win64 ?
« on: January 09, 2013, 10:25:27 am »
Hello,

This code works fine with Win32
Code: [Select]
//sRTF : String;
procedure TForm1.Button1Click(Sender: TObject);
var
  ms1 : TStringStream;
begin
  try
    ms1 := TStringStream.Create('');
    RichMemo1.SaveRichText(ms1);
    sRTF := ms1.DataString;
    showmessage(sRTF);
  except
    showmessage('Oups');
  end;
  ms1.Free;
end;
 
 
procedure TForm1.Button2Click(Sender: TObject);
var
  ms2 : TStringStream;
begin
  try
    ms2 := TStringStream.Create(sRTF);
    RichMemo2.LoadRichText(ms2);
  except
    showmessage('Oups');
  end;
  ms2.Free;
end;

With Win64 :
RichMemo1.SaveRichText(ms1) -->  Error RichEditWndProc RunError(216).
The problem seems to be the call of SendMessage(RichEditWnd, EM_STREAMOUT, SF_RTF, LPARAM(@cbs) ); (line 373) from
class function TRichEditManager.SaveRichText(RichEditWnd: Handle; ADst: TStream): Boolean; in file Win32RichMemoProc...

Remark : the button's procedures don't work with gtk2/amd64.

Help. Please. Thanks. Gilles

gillesfr14

  • Newbie
  • Posts: 6
Re: TRichMemo.SaveRichText Win64 ?
« Reply #1 on: January 09, 2013, 11:31:51 am »
Maybe here the Win64's solution : http://bugs.freepascal.org/bug_view_advanced_page.php?bug_id=21103.

I am going to test. Regards. Gilles

 

TinyPortal © 2005-2018