[This is preliminary documentation and is subject to change.]

Called when a file/directory is displayed in thumbnail view. It can be used to return a custom bitmap for that file/directory.

Namespace: Tools.TotalCommanderT
Assembly: Tools.TotalCommander (in Tools.TotalCommander.dll) Version: 1.5.3.38916 (1.5.3.38916)

Syntax

C#
[EditorBrowsableAttribute(EditorBrowsableState.Never)]
[CLSCompliantAttribute(false)]
public int FsGetPreviewBitmap(
	sbyte* RemoteName,
	int width,
	int height,
	HBITMAP__** ReturnedBitmap
)
Visual Basic
<EditorBrowsableAttribute(EditorBrowsableState.Never)> _
<CLSCompliantAttribute(False)> _
Public Function FsGetPreviewBitmap ( _
	RemoteName As SByte*, _
	width As Integer, _
	height As Integer, _
	ReturnedBitmap As HBITMAP__** _
) As Integer
Visual C++
[EditorBrowsableAttribute(EditorBrowsableState::Never)]
[CLSCompliantAttribute(false)]
public:
int FsGetPreviewBitmap(
	signed char* RemoteName, 
	int width, 
	int height, 
	HBITMAP__** ReturnedBitmap
)
F#
[<EditorBrowsableAttribute(EditorBrowsableState.Never)>]
[<CLSCompliantAttribute(false)>]
member FsGetPreviewBitmap : 
        RemoteName:nativeptr<sbyte> * 
        width:int * 
        height:int * 
        ReturnedBitmap:nativeptr<nativeptr<HBITMAP__>> -> int 
JScript
JScript does not support APIs that consume or return unsafe types.

Parameters

RemoteName
Type: System..::..SByte*
This is the full path to the file or directory whose bitmap is to be retrieved. When extracting a bitmap, you can return a bitmap name here - this ensures that the icon is only cached once in the calling program. The returned bitmap name must not be longer than MaxPath characters (including terminating 0!). The bitmap handle must still be returned in ReturnedBitmap!
width
Type: System..::..Int32
The maximum dimensions of the preview bitmap. If your image is smaller, or has a different side ratio, then you need to return an image which is smaller than these dimensions!
height
Type: System..::..Int32
The maximum dimensions of the preview bitmap. If your image is smaller, or has a different side ratio, then you need to return an image which is smaller than these dimensions!
ReturnedBitmap
Type: HBITMAP__**
Here you need to return the bitmap handle.

Return Value

The BitmapHandling value

Remarks

This function is new in version 1.4. It requires Total Commander >=7.0, but is ignored by older versions.

Inportant notes

This function is only called in Total Commander 7.0 and later. The reported plugin version will be >= 1.4.The bitmap handle goes into possession of Total Commander, which will delete it after using it. The plugin must not delete the bitmap handle!Make sure you scale your image correctly to the desired maximum width+height! Do not fill the rest of the bitmap - instead, create a bitmap which is SMALLER than requested! This way, Total Commander can center your image and fill the rest with the default background color.

This function is called by Total Commander and is not intended for direct use.

See Also