Menu

get wmf from Clipboard

Help
Anonymous
2002-06-03
2012-07-26
  • Anonymous

    Anonymous - 2002-06-03

    Hi gnuwin32,
    My goal is to convert picture in metafile format on clipboard to jpeg. For Excel Chart, window captures the data in metafile picture or enhanced metafile only. I save the HMETAFILE by

    metafile = GetClipboardData(CF_METAFILEPICT);
    new_metafile = CopyMetaFile(metafile->hMF, "C:\\temp\\new.wmf");

    where metafile is the handle to picture METAFILEPICT structure. This creates C:\temp\new.wmf containing clipboard metafile data. When I pass new.wmf to wmf2gd.exe I get a memory error in libwmf.dll. I'm guessing the wmf file I created is not good. Does libwmf take metafile structures? Do you have any suggestion how to go about transform metafile data on clipboard? Thanks.
    -Cathie

     
    • GnuWin

      GnuWin - 2002-06-03

      I think that your new.wmf is not a good wmf file. Can you view it in a file viewer (preferably, try several viewers)?

       
    • Anonymous

      Anonymous - 2002-06-03

      I can view wmf file in IE/Netsape. But the example .wmf files from download are not viewable via browers.

       
      • GnuWin

        GnuWin - 2002-07-01

        Could you perhaps upload a wmf-file that cannot be converted by wmf2gd?