Archived

This topic is now archived and is closed to further replies.

Xeon_Boy

Serializing a bitmap to disk?

Recommended Posts

I''m using MFC and Visual C++! ;-) I tried the following in my CMyProgramDoc::Serialize(CArchive &ar) : if(ar.IsStoring()) { ar << m_MyBitmap; //I''m trying to serialize a bitmap file } ... The compiler complains of an error that the ''<<'' operator cannot accept the bitmap file!!!! How do I solve it? Thanks!!! :-D "The feeling of mastering and understanding hard stuff in Game Programming is just like the feeling u get when u perform an Air-Walk in the basketball court, soaring.....and everyone''s watching in awe......."

Share this post


Link to post
Share on other sites
serialization is writing a class to the disk,
i think that you must declare a class structure which contains all the bmp fieds,
then fill these fields
then serialize.

the structure might contains something like
a header,
a data var

Dominique

Share this post


Link to post
Share on other sites