I'm trying to write out a zip file using the wxZipOutputStream. The code is from this forum and works with the xml file (when I used wxTextOutputStream). Now, I'm trying to include an image file but the SaveFile function in the wxImage class expects a class wxOutputStream but wxTextOutputStream/wxDataOutputStream have no base class so I can't compile it. I just want to write out a wxImage and an xml file to a zip. how do I go about it?
//convert stream to zip file. 
wxFFileOutputStream out(m_loaded_filename.GetFullPath()); 
wxZipOutputStream zip(out); 
//  wxTextOutputStream txt(zip); 
wxDataOutputStream txt(zip); 
zip.PutNextEntry("my.xml"); 
txt << xmltext; 
... 
... 
... 
//value is wxImage* 
//key is wxString 
zip.PutNextEntry(key); //filename 
if(value->IsOk()) 
{ 
   value->SaveFile(zip); //compiler throws error. 
}