X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d9317fd47263a9521466156d7bf0f7988000bf15..5b9255698ac3ade7e00e3d5efef95b223e3c9cae:/src/msw/metafile.cpp diff --git a/src/msw/metafile.cpp b/src/msw/metafile.cpp index eb13f6384f..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); @@ -490,8 +494,8 @@ bool wxMetafileDataObject::SetData(size_t WXUNUSED(len), const void *buf) wxMetafile mf; mf.SetWindowsMappingMode(mfpict->mm); - int w = mfpict->xExt, - h = mfpict->yExt; + LONG w = mfpict->xExt, + h = mfpict->yExt; if ( mfpict->mm == MM_ANISOTROPIC ) { // in this case xExt and yExt contain suggested size in HIMETRIC units