MAC OSX wxMetafile and Clipboard problem

Florent Lejeune flejeune at articque.com
Wed May 2 05:50:36 PDT 2007


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 bu=
t when I try to paste it in Word, I get an error message (something like "i=
nsufficient 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 =3D dc.Close();
      if (mf)
      {
        bool success =3D mf->SetClipboard(width,height);
        delete mf;
      }
    }

Thanks for your help,  =


Regards,

-- =

Florent Lejeune
D=E9veloppeur
 =

Articque
Moulin des Roches
37230 Fondettes
France
web =3D http://www.articque.com
tel: +33 02 47 49 90 49
fax: +33 02 47 49 91 49 =

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wx-users/attachments/20070502/f31=
64a90/attachment.htm


More information about the wx-users mailing list