如何拖放或复制粘帖网页中的内容到一个RichEdit或其他可实现的控件中,要求包括图片及表格等(200分)

  • 主题发起人 主题发起人 sbc
  • 开始时间 开始时间
S

sbc

Unregistered / Unconfirmed
GUEST, unregistred user!
控件可以任意,只要能在delphi中显示所选取的内容既可,也就是把选取区域的网页的全部格式放在控件中并显示出来
 
richedit其实是rtf格式的。
在任何一个支持RTF格式的东西粘贴后,
在richedit的真正内容(而不是.text,具体哪个不记得了)的适当地方(你要放的地方)
把东西add进去就可以了。
 
试过Rxrichedit,richedit98的PasteFromClipboard与拖动都只能粘帖文本的
 
你必须采用DRAG&DROP组件包。
 
请说一下具体实现的步骤
 
OLEContainter + Word. :-)
 
不通过中介可以吗
 
强烈关注。我正要实现拖html表格到richedit中呢。
 
很难喔,除非用第三方控件,我粘贴一很小很小的图片(16色,画幅再小就看不见了),rtf编码如下,再几种色彩就如天书
{/rtf1/ansi/ansicpg936/deff0/deflang1033/deflangfe2052{/fonttbl{/f0/fnil/fcharset134 /'cb/'ce/'cc/'e5;}}
/viewkind4/uc1/pard/lang2052/f0/fs20{/object/objemb{/*/objclass Paint.Picture}/objw389/objh194{/*/objdata
01050000
02000000
07000000
50427275736800
00000000
00000000
60010000
424d460100000000000076000000280000001a0000000d0000000100040000000000d0000000c4
0e0000c40e00000000000000000000000000000000800000800000008080008000000080008000
80800000c0c0c000808080000000ff0000ff000000ffff00ff000000ff00ff00ffff0000ffffff
00ffffffffffffffffff0fffffff000000fffffffffffffffff0ffffffff000000ffffffffffff
ffff0000000000000000ffffffffffffffffffffffffff000000fffcfff000ffffffffffffffff
000000fffffff0f0000ffffff990ffff000000ffffffff0fff000000999fffff000000ffffffff
00000fffff9f9fffff000000ffffff000f999fffff9f9fffff000000ffffff9999fff99fff9999
99ff000000fffffffffffffff9fff9ffffff000000ffffffffffffffff999fffffff000000ffff
ffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000
00
01050000
00000000
}{/result{/pict/wmetafile8/picw687/pich343/picwgoal389/pichgoal194
010009000003210100000200aa0000000000050000000b0200000000050000000c025701af0225
000000f7000003100000000000800000000080000080800000000080008000800000808000c0c0
c00080808000ff00000000ff0000ffff00000000ff00ff00ff0000ffff00ffffff000400000034
020000030000003500aa000000430f2000cc0000000d001a00000000005701af02000000002800
00001a0000000d0000000100040000000000d0000000c40e0000c40e0000000000000000000000
000000000080000080000000808000800000008000800080800000c0c0c000808080000000ff00
00ff000000ffff00ff000000ff00ff00ffff0000ffffff00ffffffffffffffffff0fffffff0000
00fffffffffffffffff0ffffffff000000ffffffffffffffff0000000000000000ffffffffffff
ffffffffffffff000000fffcfff000ffffffffffffffff000000fffffff0f0000ffffff990ffff
000000ffffffff0fff000000999fffff000000ffffffff00000fffff9f9fffff000000ffffff00
0f999fffff9f9fffff000000ffffff9999fff99fff999999ff000000fffffffffffffff9fff9ff
ffff000000ffffffffffffffff999fffffff000000ffffffffffffffffffffffffff0000002d00
0000f7000003140000000000800000000080000080800000000080008000800000808000c0c0c0
00c0dcc000a6caf000fffbf000a0a0a40080808000ff00000000ff0000ffff00000000ff00ff00
ff0000ffff00ffffff00040000003402010004000000f0010000030000000000
}}}/par
}
 
就是 816 说的方法,你用过以后再讨论。另:必须加入多种格式的DRAG&DROP,这个控
件包里都有了,不过连带着还是要做点解析工作的。
 
图象无所谓,如果Richedit中能实现表格编辑功能就好了
 
实现表格的RTF控件有好几个,但都不如微软的表格好使
WP TOOLS
RICHVIEW
TX Text Control
 
而且对中文的支持都有问题
 
后退
顶部