LFile::BrowseDirCallBack

#include "ltwrappr.h"

virtual L_INT LFile::BrowseDirCallBack(pLBitmap, pszFilename, pFileInfo, nStatus, nPercent)

Handles the thumbnails generated by calling the LFile::BrowseDir function.

Parameters

LBitmapBase *pLBitmap

The pointer to the LBitmapBase object that references the thumbnail generated by LFile::BrowseDir. You can copy this bitmap, save it to file, insert it into a LEADTOOLS ImageList Control, or otherwise process it as needed in your application.

L_TCHAR * pszFilename

Character string containing the filename from which this thumbnail was generated.

pFILEINFO pFileInfo

Pointer to a FILEINFO structure containing information about pszFilename.

L_INT nStatus

Status code. If an error occurred during thumbnail generation, this will be < SUCCESS. Possible values are:

Value Meaning
BROWSE_LOADING [2] Indicates image is being loaded, see nPercent.
BROWSE_SKIPPED [3] Indicates image was skipped because it was larger than the specified range in LFile::BrowseDir.
BROWSE_PRELOAD [4] Indicates that LEADTOOLS has found a file and is about to determine the file format. It will then attempt to create a thumbnail for it. If the user wishes to avoid the internal file information processing, return ERROR_FILE_FORMAT. This will cause LEADTOOLS to skip the file.

L_INT nPercent

Represents the percentage completion of a file load when nErrorCode is equal to BROWSE_LOADING.

Returns

Value Meaning
> 0 The function was successful, and returns the handle to the ImageList Control window.
< 0 An error occurred. Return Codes

Comments

You must return SUCCESS to continue browsing for supported image files. The value you return from this callback will also be returned from LFile::BrowseDir.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

For an example, refer to LFile::BrowseDir.

Help Version 21.0.2021.3.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help