#include "wx/log.h"
#include "wx/dataobj.h"
+#include "wx/mstream.h"
+#include "wx/image.h"
#define INCL_DOS
#include <os2.h>
// wxDataFormat
// ----------------------------------------------------------------------------
-wxDataFormat::wxDataFormat(
- wxDataFormatId vType
-)
+wxDataFormat::wxDataFormat()
{
- PrepareFormats();
m_vType = wxDF_INVALID;
m_vFormat = 0;
}
else
{
wxDataFormat* pFormats = new wxDataFormat[nFormatCount];
- GetAllFormats( rFormats
+ GetAllFormats( pFormats
,vDir
);
for (n = 0; n < nFormatCount; n++)
{
- if (rFormats[n] == rFormat)
+ if (pFormats[n] == rFormat)
break;
}
- delete [] rFormats;
+ delete [] pFormats;
// found?
return n < nFormatCount;
for (size_t i = 0; i < m_filenames.GetCount(); i++)
{
- filenames += m_filenames[i];
- filenames += (wxChar)0;
+ sFilenames += m_filenames[i];
+ sFilenames += (wxChar)0;
}
- memcpy(pBuf, filenames.mbc_str(), filenames.Len() + 1);
+ memcpy(pBuf, sFilenames.mbc_str(), sFilenames.Len() + 1);
return TRUE;
}
memcpy(m_pngData, pBuf, m_pngSize);
+#if wxUSE_STREAMS
wxMemoryInputStream vMstream((char*)m_pngData, m_pngSize);
wxImage vImage;
wxPNGHandler vHandler;
}
m_bitmap = vImage.ConvertToBitmap();
+#endif //wxUSE_STREAMS
+
return m_bitmap.Ok();
}
if (!m_bitmap.Ok())
return;
+#if wxUSE_STREAMS
wxImage vImage(m_bitmap);
wxPNGHandler vHandler;
wxCountingOutputStream vCount;
- vHandler.SaveFile(&rImage, vCount);
+ vHandler.SaveFile(&vImage, vCount);
m_pngSize = vCount.GetSize() + 100; // sometimes the size seems to vary ???
m_pngData = malloc(m_pngSize);
- wxMemoryOutputStream mstream((char*) m_pngData, m_pngSize);
+ wxMemoryOutputStream vMstream((char*) m_pngData, m_pngSize);
+
vHandler.SaveFile(&vImage, vMstream );
+#endif
}