~~Title: DVP_LoadBitmap~~ DVP_LoadBitmap && HBITMAP && The bitmap image, as a standard Windows **HBITMAP** handle. Alternatively, a raw JPEG or PNG data stream can be returned - see [[:plugins:viewer_plugins:loading_bitmap_images_the_bitmap_method|Loading Bitmap Images (the "bitmap method")]]. && hWnd && HWND && This parameter specifies the parent window handle that should be used to display any error messages if appropriate. && lpszName && LPTSTR && Supplies the name of the file, including the full path. && lpVPFileInfo && LPVIEWERPLUGINFILEINFO && This points to a **VIEWERPLUGINFILEINFO** structure that contains the data that you returned in the call to [[.dvp_identifyfile|DVP_IdentifyFile]], including the contents of the **dwPrivateData** field. You can use this field to pass your own data between the [[.dvp_identifyfile|DVP_IdentifyFile]] function and this one. && lpszDesiredSize && LPSIZE && 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. && hAbortEvent && HANDLE && This parameter specifies an event object that Directory Opus uses to abort your plugin during a lengthy operation. Please see the description of the [[.dvp_identifyfile|DVP_IdentifyFile]] function for information on how to use this parameter. The **DVP_LoadBitmap** function is called to load a bitmap from a disk file. Your **DVP_LoadBitmap** function must access the specified file and generate a bitmap image, which must be formatted and returned as a standard Windows **HBITMAP** handle (for example, created by a call to **CreateCompatibleBitmap()** or **CreateDIBSection()**). The size, bit depth and format of this bitmap are not restricted. However, in the case of thumbnail images, Directory Opus may pass a "suggested" size to your function. If you are able to generate scaled images you may wish to use this suggested size to speed up any image scaling that Directory Opus has to perform to reduce the size of the bitmap that you return to that specified by the user in their Thumbnail Preferences. For example, the JPEG file format lends itself to very quick image scaling by factors of ½, ¼, etc. If you ignore the suggested size parameter then Directory Opus will do its own scaling if necessary.