如何使用信息?

metaphy 2009-03-10 03:38:17
其实比较简单,就是把一个不定长字符串(包含某些信息)写入EMF文件的description字段(其中EMF structure中的Description String应该可以存这些信息)。当然前提是能够读取这一字段。
问题是用C#肯定有比较现成的做法。哪位做过或知道怎么处理?
网上搜索的尽是使用GDI+在form上绘图的方式。我想要的是对EMF文件、流的操作的方式..
谢谢
...全文
84 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
江城老温 2009-03-10
  • 打赏
  • 举报
回复
帮顶下先。
metaphy 2009-03-10
  • 打赏
  • 举报
回复
这是C++的一个封装。。C#有没有??
Method Description
Metafile::ConvertToEmfPlus The ConvertToEmfPlus method converts this Metafile object to the EMF+ format.
Metafile::ConvertToEmfPlus The ConvertToEmfPlus method converts this Metafile object to the EMF+ format.
Metafile::ConvertToEmfPlus The ConvertToEmfPlus method converts this Metafile object to the EMF+ format.
Metafile::EmfToWmfBits Converts an enhanced-format metafile to a Windows Metafile Format (WMF) metafile and stores the converted records in a specified buffer.
Metafile::GetDownLevelRasterizationLimit Gets the rasterization limit currently set for this metafile. The rasterization limit is the resolution used for certain brush bitmaps that are stored in the metafile. For a detailed explanation of the rasterization limit, see SetDownLevelRasterizationLimit.
Metafile::GetHENHMETAFILE The GetHENHMETAFILE method gets a Windows handle to an Enhanced Metafile (EMF) file.
Metafile::GetMetafileHeader(WCHAR*,MetafileHeader*) The GetMetafileHeader method gets the header.
Metafile::GetMetafileHeader(HENHMETAFILE*,MetafileHeader*) The GetMetafileHeader method gets the header.
Metafile::GetMetafileHeader(HMETAFILE,WmfPlaceableFileHeader*,MetafileHeader*) The GetMetafileHeader method gets the metafile header of this metafile.
Metafile::GetMetafileHeader(MetafileHeader*) The GetMetafileHeader method gets the header.
Metafile::GetMetafileHeader(IStream*,MetafileHeader*) The GetMetafileHeader method gets the header.
Metafile::PlayRecord The PlayRecord method plays a metafile record.
Metafile::SetDownLevelRasterizationLimit Sets the resolution for certain brush bitmaps that are stored in this metafile.
metaphy 2009-03-10
  • 打赏
  • 举报
回复
也许真可以试试。修改下面2个字段就可以

nDescription (4 bytes): The number of Unicode characters in the optional description string that follows.

Description (variable): An optional, null-terminated Unicode string that describes this group of records.
metaphy 2009-03-10
  • 打赏
  • 举报
回复
定位并写入,可能有问题。比如破坏了某一个结构,我对这个结构还不熟悉。。

我总感觉C#应该封装一个对象来提供操作,就像对MP3格式的album字段等修改一样简单。。
xianguang321 2009-03-10
  • 打赏
  • 举报
回复
既然EMF文件的格式你知道,那你就可以用FileStream来定位写入。
metaphy 2009-03-10
  • 打赏
  • 举报
回复
晕,标题怎么变成这样了

110,536

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧