X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f40dba935026712ea572cd9847b9ae6fa1a476f2..76c79ff467c1af23e3cbc6201c1e6110c110b26a:/src/msw/metafile.cpp diff --git a/src/msw/metafile.cpp b/src/msw/metafile.cpp index f8bea1184f..ce2568c2c2 100644 --- a/src/msw/metafile.cpp +++ b/src/msw/metafile.cpp @@ -104,6 +104,9 @@ wxMetafile::~wxMetafile() bool wxMetafile::SetClipboard(int width, int height) { +#if !wxUSE_CLIPBOARD + return FALSE; +#else if (!m_refData) return FALSE; @@ -119,6 +122,7 @@ bool wxMetafile::SetClipboard(int width, int height) wxCloseClipboard(); return success; +#endif } bool wxMetafile::Play(wxDC *dc) @@ -375,12 +379,12 @@ bool wxMakeMetafilePlaceable(const wxString& filename, int x1, int y1, int x2, i p < (WORD *)&pMFHead ->checksum; ++p) pMFHead ->checksum ^= *p; - FILE *fd = fopen(filename.fn_str(), "rb"); + FILE *fd = wxFopen(filename.fn_str(), "rb"); if (!fd) return FALSE; wxChar tempFileBuf[256]; wxGetTempFileName(wxT("mf"), tempFileBuf); - FILE *fHandle = fopen(wxConvFile.cWX2MB(tempFileBuf), "wb"); + FILE *fHandle = wxFopen(wxConvFile.cWX2MB(tempFileBuf), "wb"); if (!fHandle) return FALSE; fwrite((void *)&header, sizeof(unsigned char), sizeof(mfPLACEABLEHEADER), fHandle);