help with bitmap & GUI

Could anybody help me with this problem please?
I've been given a task to display Bitmaps within a GUI interface. I'm not
very familiar with windows API functions & C++ classes.
At run time, I will have no access to the Bit map file stored on the disk,
but I will have access to its stored data.
To simulate this problem at run time, I've opened a Bitmap file using fopen
function (in binary mode & read access) & discarding it's
'BitmapFileHeaderInfo' & 'BitmapInfoHeader' I've stored its data(colour
tables & bit information) to a char buffer. I then pass this buffer to the
following windows API function:

    BitmapHandle = CreateBitMap(DeviceHandle, 1, 1, Buffer containg data);
    SelectBbject(DeviceHandle, BitmapHandle);

The above procedure will result in a monochrome Bitmap to be displayed on
the destination window.
The CreateBitmap function does not allow me to use the actual number of
colour plates &  bits per pixel values (obtained from the
BitmapInfoHeader) - I can only set these parameters to 1!!!???

To approach this problem differently, I tried to use the Bitmap class from
the C++ builder. This class has 2 usefull functions(methods):

    1         Bitmap->LoadFromFile (FileName)    This works but I cannot use
functio as I wont have acess to the
file in run time.

    2        Bitmap->LoadFromStream(TSream)    For this purpose I've opened
Bitmap file using fopen function (in
binary mode & read acess) & read
all its content to a char buffer & using an object of class type TStream
I've tried to load the buffer into the stream object as follows:

    Stream->WriteBuffer(Buffer, Size of the Bitmap file);
The above function causes an exception handle!!!??
If I get passed this stage I'll be able to call the function below:


Any thoughts?
I am working on Borland C++ builder platform.
Thanks for reading this message.