Click to See Complete Forum and Search --> : array based streams


Andrew Truckle
May 4th, 1999, 07:21 AM
I am attempting to use the PreviewFileDlg found on this site which uses the CDib class.

The Read() member function of class expects to be passed a CFile object since it is designed to read from say a BMP file.

However, I want to read the image preview from an AutoCAD drawing file. Now, I have the code which will extract the BMP to a buffer.

So, I need to update the CDib Read function or the CDibStatic LoadDib function to accomodate loading from a buffer.

I recall that in C++ you could use a strstream which would convert a buffer into the equivalent of a file stream.

But I am not sure if this is the best approach.

Could you help me in anyway?