previous up next     contents index
Next: wxMediaBuffer::WriteToFile Up: wxMediaBuffer: wxObject Previous: wxMediaBuffer::WriteFootersToFile

wxMediaBuffer::WriteHeadersToFile

  Bool WriteHeadersToFile (wxMediaStreamOut& stream)

  This method is called when the buffer is being saved to a file. The return value should be TRUE if there were no errors. Override this method for your own use, but always call the inherited method so that it can write its own extra headers. The default method does nothing.

To write a header, call wxMediaBuffer::BeginWriteHeaderFooterToFile (section gif), passing in the address of a long integer. Then write the header data and end by calling wxMediaBuffer::EndWriteHeaderFooterToFile (section gif), , passing back the long integer that was set by BeginWriteHeaderFooterToFile. Unless you follow this procedure correctly, you will not be able to get the header data back at read-time (and the file will be corrupted).



PLT