现有的实现技术是使用OLE技术把autoCAD图形作为一个OLE对象嵌入到CAPP的工艺卡片中。存在的问题是:
1)附图的线条非常细;
2)彩色线条是虚线;
3)各个卡片中的文本、标注的尺寸大小不一致;(附图的放缩比例不同)
4)底色为黑色,如何变成白色?需要研究OLE是如何使用WMF文件的(OLE是以WMF格式显示嵌入到工艺卡片上的CAD图形的)。请各位大虾帮忙啦!

解决方案 »

  1.   

    WMF文件格式
          WMF是WindowsMetafileFormat的缩写,文件扩展名是.wmf,是MicrosoftWindows中常见的一种图元文件格式。它具有文件短小、图案造型化的特点,整个图形常由各个独立的组成部分拼接而成,但其图形往往较粗糙,并且只能在MicrosoftOffice中调用编辑。http://www.china-askpro.com/msg22/qa61.shtml
      

  2.   

    自己写个显示wmf的程序就可以阿。
      

  3.   

    GDI和GDI+都有读写emf, wmf的类,几行代码就搞定了,自己找找msdn啊
      

  4.   

    wmf metafile formata metafile for the microsoft windows operating system consists of a collection of graphics device interface (gdi) functions that describe an image. because metafiles take up less space and are more device-independent than bitmaps, they provide convenient storage for images that appear repeatedly in an application or need to be moved from one application to another. to generate a metafile, a windows application creates a special device context that sends gdi commands to a file or memory for storage. the application can later play back the metafile and display the image. during playback, windows breaks the metafile down into records and identifies each object with an index to a handle table. when a meta_deleteobject record is encountered during playback, the associated object is deleted from the handle table. the entry is then reused by the next object that the metafile creates. to ensure compatibility, an application that explicitly manipulates records or builds its own metafile should manage the handle table in the same way. for more information on the format of the handle table, see the handletable structure. in some cases, there are two variants of a metafile record, one representing the record created by windows versions before 3.0 and the second representing the record created by windows versions 3.0 and later. windows versions 3.0 and later play all metafile versions but store only 3.0 and later versions. windows versions earlier than 3.0 do not play metafiles recorded by windows versions 3.0 and later. 
    a metafile consists of two parts: a header and a list of records. the header and records are described in the remainder of this topic. for a list of function-specific records, see metafile records. metafile headerthe metafile header contains a description of the size of the metafile and the number of drawing objects it uses. the drawing objects can be pens, brushes, bitmaps, or fonts. 
    the metafile header has the following form: typedef struct tagmetaheader {
    word mttype;
    word mtheadersize;
    word mtversion;
    dword mtsize;
    word mtnoobjects;
    dword mtmaxrecord;
    word mtnoparameters;
    } metaheader;following are the members in the metafile header: mttype    specifies whether the metafile is stored in memory or recorded in a file. this member has one of the following values: value    meaning0    metafile is in memory. 
    1    metafile is in a file. mtheadersize    specifies the size, in words, of the metafile header. 
    mtversion    specifies the windows version number. the version number for windows version 3.0 and later is 0x300. 
    mtsize    specifies the size, in words, of the file. 
    mtnoobjects    specifies the maximum number of objects that can exist in the metafile at the same time. 
    mtmaxrecord    specifies the size, in words, of the largest record in the metafile. 
    mtnoparameters    not used. typical metafile recordthe graphics device interface stores most of the gdi functions that an application can use to create metafiles in typical records. 
    a typical metafile record has the following form: struct {
    dword rdsize;
    word rdfunction;
    word rdparm[];
    }following are the members in a typical metafile record: rdsize    specifies the size, in words, of the record. 
    rdfunction    specifies the function number. this value may be the number of any function in the table at the end of this section. 
    rdparm    identifies an array of words containing the function parameters (listed in the reverse order in which they are 
    passed to the function). following are the gdi functions found in typical records, along with their hexadecimal values: gdi function    valuearc    0x0817 
    chord    0x0830 
    ellipse    0x0418 
    excludecliprect    0x0415 
    floodfill    0x0419 
    intersectcliprect    0x0416 
    lineto    0x0213 
    moveto    0x0214 
    offsetcliprgn    0x0220 
    offsetviewportorg    0x0211 
    offsetwindoworg    0x020f 
    patblt    0x061d 
    pie    0x081a 
    realizepalette (3.0 and later)    0x0035 rectangle    0x041b 
    resizepalette (3.0 and later)    0x0139 
    restoredc    0x0127 
    roundrect    0x061c 
    savedc    0x001e 
    scaleviewportext    0x0412 
    scalewindowext    0x0400 
    setbkcolor    0x0201 
    setbkmode    0x0102 
    setmapmode    0x0103 
    setmapperflags    0x0231 
    setpixel    0x041f 
    setpolyfillmode    0x0106 
    setrop2    0x0104 setstretchbltmode    0x0107 
    settextalign    0x012e 
    settextcharacterextra    0x0108 
    settextcolor    0x0209 
    settextjustification    0x020a 
    setviewportext    0x020e 
    setviewportorg    0x020d 
    setwindowext    0x020c 
    setwindoworg    0x020b placeable windows metafilesa placeable windows metafile is a standard windows metafile that has an additional 22-byte header. the header contains information about the aspect ratio and original size of the metafile, permitting applications to display the metafile in its intended form. 
    the header for a placeable windows metafile has the following form: