如何在VC中存储多格式元素数据 [英] How to store multi-format elements data in VC

查看:78
本文介绍了如何在VC中存储多格式元素数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Dear All, the questions puzzled us for a long time.
Question 1:How to store the data which comprises pictures , tables, formatted text and hyperlink text in VC? That is to say, in which format or through which technique to achieve this goal. Refer to the MFC example programme Wordpad, we can save it as .doc document. But we don’t want to do so.
Above-mentioned pictures, tables, formatted text are the same as those in Word. But hyperlink text is about this mentioned as follow:







In the picture above(coming from MSDN), blue strings are hyperlink format. When click on the strings, the text which notes the strings is shown within a yellow rectangle. So, to implement the hyperlink, information including the strings, the notes, and the link info is needed to be stored.

Question 2:How to implement the effect as the same as the Collapse/Expand shown in codeproject.com in CrichEditView?(pictures coming from www.codeproject.com) Explained as follow:when click on the hyperlink text Collapse(shown as the picture 1), the yellow region is hidden. And the Collapse is converted to string Expand synchronously(shown as the picture 2). The text in the yellow region of picutre 1 can be edited. So, my question is: how to implement the effects of Collapse and Expand?







图片1 br />


图2

谢谢,最诚挚的问候。




Picture 1

Picture 2
Thanks, my best regards to you.

推荐答案

如果您不想以Microsoft的格式存储复合文档,那么您可以尝试使用Open / Libre Office使用的 Open Document Format 或编写自己的XML + UUEncoded图像数据格式。



实现折叠/扩展控件实际上就像实现一个只有2个状态的非常简单的动画。您在同一控件中具有相同的信息,但有两种方法可以绘制与折叠或展开的外观相对应的视图。在代码项目上具有类似于可折叠DIV的外观的常规折叠/展开面板将是一个不错的MFC自定义控件项目。如果您之前没有创建过自定义控件,则需要进行一些研究。
If you don''t want to store compound documents in Microsoft''s format then you could try Open Document Format used by Open/Libre Office or make up your own XML + UUEncoded image data format.

Implementing a Collapse/Expand control is really like implementing a very simple animation with only 2 states. You have the same information in the same control but two ways to draw the view corresponding to the collapsed or expanded appearance. A general Collapse/Expand panel with the appearance similar to a collapsible DIV on Code Project would be a nice MFC Custom Control project. Some research into Custom Controls would be needed if you haven''t created one before.


这篇关于如何在VC中存储多格式元素数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆