MAC OSX wxMetafile and Clipboard problem

Woody Conover xp at acornnmr.com
Wed May 2 08:54:28 PDT 2007


Howdy,

What version of wxMac are you using?

woody at acornnmr.com


-----Original Message-----
From: Florent Lejeune [mailto:flejeune at articque.com] 
Sent: Wednesday, May 02, 2007 5:51 AM
To: wx-users at lists.wxwidgets.org
Subject: MAC OSX wxMetafile and Clipboard problem

Hi,
 
I'm using wx270 under Mac OSX and I have a problem with the wxMetafile
and the Clipboard : I create a simple drawing and copy it into the
clipboard but when I try to paste it in Word, I get an error message
(something like "insufficient memory or disk space to finish the
operation") and nothing else happens.
 
Here is my code (inspired from the wxMetafile::SetClipboard
documentation) :
 
    wxMetafileDC dc;
    if (dc.Ok())
    {
      dc.SetPen(*wxBLACK);
      wxColour  acol(*wxWHITE);
      wxBrush abrush(acol,wxSOLID);
      dc.SetBrush(abrush);
      dc.DrawRectangle(0,0,width,height);
      dc.DrawLine(0,0,width,height);
      dc.DrawLine(0,height,width,0);
      wxMetafile *mf = dc.Close();
      if (mf)
      {
        bool success = mf->SetClipboard(width,height);
        delete mf;
      }
    }
Thanks for your help,  
 
Regards,
 
-- 
Florent Lejeune
Développeur
 
Articque
Moulin des Roches
37230 Fondettes
France
web = http://www.articque.com
tel: +33 02 47 49 90 49
fax: +33 02 47 49 91 49 





More information about the wx-users mailing list