关于rtf编辑器 (100分)

  • 主题发起人 主题发起人 gonebygone
  • 开始时间 开始时间
G

gonebygone

Unregistered / Unconfirmed
GUEST, unregistred user!
在word,excel,outlook express中可以文本按照html的格式进行编辑,如改变字体,插入表格等
我想在程序中实现同样的功能,应该如何来作。
是不是可以直接调用office来完成?
还有如hotmail的网页邮件编辑功能是如何作出来的?
可以调用word中的各种工具条吗?
请大虾指教,谢谢。
 
用到CLX中的TextViewer。这个构件的特点是完全基于HTML的,而它有Text属性,因而又和Memo相兼容。所以,只要建立一个CLX Application,在窗体上面放上一个Memo和一个TextViewer,并修改Memo的OnChange事件:
procedure TForm1.Memo1Change(Sender: TObject);
begin
TextViewer1.Text := Memo1.Text;
end;
///////////////////////////////////////////////////////////////////
不过要注意,这个是在CLX下编译的,与VCL不兼容!!!!!!!!
你在Memo1中写的东西,可以在TextViewer中实时显示
 
用Dhtmledit.ocx
另一种方式是office的saveas('XXX.html')实现
 
wanglogon,
又没有dhtmledit的详细使用方法,请给我发一个
邮箱:o0sir@163.com
万分感谢。
 
我是看msdn的,检索一下有例子的
DECMD_BOLD = $00001388;
DECMD_COPY = $0000138A;
DECMD_CUT = $0000138B;
DECMD_DELETE = $0000138C;
DECMD_DELETECELLS = $0000138D;
DECMD_DELETECOLS = $0000138E;
DECMD_DELETEROWS = $0000138F;
DECMD_FINDTEXT = $00001390;
DECMD_FONT = $00001391;
DECMD_GETBACKCOLOR = $00001392;
DECMD_GETBLOCKFMT = $00001393;
DECMD_GETBLOCKFMTNAMES = $00001394;
DECMD_GETFONTNAME = $00001395;
DECMD_GETFONTSIZE = $00001396;
DECMD_GETFORECOLOR = $00001397;
DECMD_HYPERLINK = $00001398;
DECMD_IMAGE = $00001399;
DECMD_INDENT = $0000139A;
DECMD_INSERTCELL = $0000139B;
DECMD_INSERTCOL = $0000139C;
DECMD_INSERTROW = $0000139D;
DECMD_INSERTTABLE = $0000139E;
DECMD_ITALIC = $0000139F;
DECMD_JUSTIFYCENTER = $000013A0;
DECMD_JUSTIFYLEFT = $000013A1;
DECMD_JUSTIFYRIGHT = $000013A2;
DECMD_LOCK_ELEMENT = $000013A3;
DECMD_MAKE_ABSOLUTE = $000013A4;
DECMD_MERGECELLS = $000013A5;
DECMD_ORDERLIST = $000013A6;
DECMD_OUTDENT = $000013A7;
DECMD_PASTE = $000013A8;
DECMD_REDO = $000013A9;
DECMD_REMOVEFORMAT = $000013AA;
DECMD_SELECTALL = $000013AB;
DECMD_SEND_BACKWARD = $000013AC;
DECMD_BRING_FORWARD = $000013AD;
DECMD_SEND_BELOW_TEXT = $000013AE;
DECMD_BRING_ABOVE_TEXT = $000013AF;
DECMD_SEND_TO_BACK = $000013B0;
DECMD_BRING_TO_FRONT = $000013B1;
DECMD_SETBACKCOLOR = $000013B2;
DECMD_SETBLOCKFMT = $000013B3;
DECMD_SETFONTNAME = $000013B4;
DECMD_SETFONTSIZE = $000013B5;
DECMD_SETFORECOLOR = $000013B6;
DECMD_SPLITCELL = $000013B7;
DECMD_UNDERLINE = $000013B8;
DECMD_UNDO = $000013B9;
DECMD_UNLINK = $000013BA;
DECMD_UNORDERLIST = $000013BB;
DECMD_PROPERTIES = $000013BC;
看懂这些就要什么有什么了
 
wanglogon,
大侠,能举一个在delphi 中使用self.DHTMLEdit1.ExecCommand()的例子吗?
我不知道参数怎么填啊。
万分感谢。马上送分。
 
代码发给你了,请查邮件
 
十分感谢爱元元的哥哥!!
 
后退
顶部