开发者

How to implement Outlook Express alike address field control

开发者 https://www.devze.com 2023-01-04 21:42 出处:网络
I was thinking about inserting some object (button, panel or static text) into textctrl, like Outlook Express does this.

I was thinking about inserting some object (button, panel or static text) into textctrl, like Outlook Express does this.

How to implement Outlook Express alike address field control

You can see from a pic "group1" is an object, you can double click on it, when you delete it, it gets deleted the whole text not just a part of it. I made some research and this text field is just a simple RichEdit20W. I understand that I can do it by implementing som开发者_JS百科e logic to a text field and so on, but it will not be proper way of doing it. I wonder how they done that. Should I implement IRichEditOleCallback interface to achieve that? I will appreciate your answer very much. Thanks!


The ability to insert an object is built-in to the RichEdit control, that's what Outlook is using, and you can do the same yourself. It seems you would need to implement your own OLE object for your own item, and then use the RichEdit's COM interface to insert it. You can see a sample on MSDN that gets the COM interface and inserts an object here.

0

精彩评论

暂无评论...
验证码 换一张
取 消