reference:plugins:viewer_plugins:loading_bitmap_images_the_bitmap_method:dvp_loadbitmapstream

DVP_LoadBitmapStream(
     HWND:hWnd,
     LPSTREAM:lpStream,
     LPTSTR:lpszName,
     LPVIEWERPLUGINFILEINFO:lpVPFileInfo,
     LPSIZE:lpszDesiredSize,
     DWORD:dwStreamFlags
)
→ HBITMAP

Arguments

hWnd

This parameter specifies the parent window handle that should be used to display any error messages if appropriate.

lpStream

Points to an IStream data stream object that you must read from in order to load the image.

lpszName

Supplies the name of the file, including the full path.

lpVPFileInfo

This points to a VIEWERPLUGINFILEINFO structure that contains the data that you returned in the call to DVP_IdentifyFile, including the contents of the dwPrivateData field. You can use this field to pass your own data between the DVP_IdentifyFile function and this one.

lpszDesiredSize

If this parameter is non-NULL and the size it contains is also non-NULL, then it represents the "suggested size" for the image that you are returning. It is quite safe to ignore this field if you are not able to use it to easily control the size of the image that you return.

dwStreamFlags

Provides information about the stream object - please see the description of the DVP_IdentifyFileStream function for more information about this parameter.

Return value

As for DVP_LoadBitmap.

Description

The DVP_LoadBitmapStream function is called to load a bitmap from a data stream.

The DVP_LoadBitmapStream function is very similar to the DVP_LoadBitmap function with the addition of the lpStream and dwStreamFlags parameters.

The lpStream parameter points to an IStream data stream object that you must read from in order to load the image. The dwStreamFlags parameter provides information about this stream object - please see the description of the DVP_IdentifyFileStream function for more information about this parameter.