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

When overriden in derved class 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#
[MethodNotSupportedAttribute]
public virtual BitmapResult GetPreviewBitmap(
	string RemoteName,
	int width,
	int height
)
Visual Basic
<MethodNotSupportedAttribute> _
Public Overridable Function GetPreviewBitmap ( _
	RemoteName As String, _
	width As Integer, _
	height As Integer _
) As BitmapResult
Visual C++
[MethodNotSupportedAttribute]
public:
virtual BitmapResult^ GetPreviewBitmap(
	String^ RemoteName, 
	int width, 
	int height
)
F#
[<MethodNotSupportedAttribute>]
abstract GetPreviewBitmap : 
        RemoteName:string * 
        width:int * 
        height:int -> BitmapResult 
[<MethodNotSupportedAttribute>]
override GetPreviewBitmap : 
        RemoteName:string * 
        width:int * 
        height:int -> BitmapResult 
JScript
public function GetPreviewBitmap(
	RemoteName : String, 
	width : int, 
	height : int
) : BitmapResult

Parameters

RemoteName
Type: System..::..String

[Missing <param name="RemoteName"/> documentation for "M:Tools.TotalCommanderT.FileSystemPlugin.GetPreviewBitmap(System.String,System.Int32,System.Int32)"]

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!

Return Value

The BitmapResult indicating where to obtain the bitmap or the bitmap itself; null when default image shuld be used.

Remarks

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! (when Bitmap()()()() is set.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.
Note
Do not thow any other exceptions. Such exception will be passed to Total Commander which cannot handle it.

Exceptions

ExceptionCondition
System..::..NotSupportedExceptionThe actual implementation is marked with MethodNotSupportedAttribute which means that the plugin doesnot support operation provided by the method.
System..::..NotSupportedExceptionThe actual implementation is marked with MethodNotSupportedAttribute which means that the plugin doesnot support operation provided by the method.

See Also