Class MaxBmpFileIcon

3DS Max Plug-In SDK

Class MaxBmpFileIcon

See Also: Class MaxIcon, Class ICustButton.

class MaxBmpFileIcon: public MaxIcon

Description:

This class is available in release 4.0 and later only.

This implementation of MaxIcon is for the icon images that are stored as ".bmp" files in 3ds max's UI directory. This is used by the macroScript facility in MAXSrcipt to specify icons. See the MAXScript documentation for "macroScript" for the exact meaning of the filename and index and details.

Methods:

public:

Prototype:

MaxBmpFileIcon(TCHAR* pFilePrefix, int index);

Remarks:

Constructor.

Parameters:

TCHAR* pFilePrefix

The file prefix to initialize with.

int index

The index of the icon.

Prototype:

MaxBmpFileIcon(SClass_ID sid, Class_ID cid);

Remarks:

Constructor.

Parameters:

SClass_ID sid

The superclass ID

Class_ID cid

The class ID/

Prototype:

HIMAGELIST GetDefaultImageList();

Remarks:

Returns the handle to the image list for the size of icons that the user has chosen.

Prototype:

HIMAGELIST GetSmallImageList();

Remarks:

Returns the image list for small icons.

Prototype:

HIMAGELIST GetLargeImageList();

Remarks:

Returns the image list for large icons.

Prototype:

int GetSmallImageIndex(bool enabledVersion = true, COLORREF backgroundColor = GetCustSysColor(COLOR_BTNFACE));

Remarks:

Returns the zero based index into the image list for the small version of this particular icon.

Parameters:

bool enabledVersion = true

Pass true for the enalbed version of the icon; false for the disabled version.

COLORREF backgroundColor = GetCustSysColor(COLOR_BTNFACE)

The background color for use in alpha blending. The files that define these icons always have an alpha mask, and so a background color is needed to blend it with.

Prototype:

int GetLargeImageIndex(bool enabledVersion = true, COLORREF backgroundColor = GetCustSysColor(COLOR_BTNFACE));

Remarks:

Returns the zero based index into the image list for the large version of this particular icon.

Parameters:

bool enabledVersion = true

Pass true for the enalbed version of the icon; false for the disabled version.

COLORREF backgroundColor = GetCustSysColor(COLOR_BTNFACE)

The background color for use in alpha blending. The files that define these icons always have an alpha mask, and so a background color is needed to blend it with.

Prototype:

bool UsesAlphaMask();

Remarks:

Returns true if the icon uses an alpha mask; otherwise false.

Prototype:

TSTR& GetFilePrefix();

Remarks:

Returns the directory of the icon.

Prototype:

int GetIndex();

Remarks:

Returns the index of the icon in the image file list.