Class MaxIcon
See Also: Class InterfaceServer, Class ICustButton, Class MaxBmpFileIcon.
class MaxIcon : public InterfaceServer
Description:
This class is available in release 4.0 and later only.
This abstract class represents an icon image for toolbar buttons, icons in list boxes, etc. The class is based on Win32 ImageLists. MaxIcons must provide an image list and index into the list for both large (24x24) and small (16x15) icons.
Methods:
public:
Prototype:
virtual HIMAGELIST GetDefaultImageList() = 0;
Remarks:
Returns the handle to the image list for the size of icons that the user has chosen.
Prototype:
virtual HIMAGELIST GetSmallImageList() = 0;
Remarks:
Returns the image list for small icons.
Prototype:
virtual HIMAGELIST GetLargeImageList() = 0;
Remarks:
Returns the image list for large icons.
Prototype:
virtual int GetSmallImageIndex(bool enabledVersion = true, COLORREF backgroundColor = GetCustSysColor(COLOR_BTNFACE)) = 0;
Remarks:
Returns the zero based index into the image list for the small version of this particular icon.
Parameters:
bool enabledVersion = true
Pass true to get the index of the enabled version of the icon; false to get the disabled version.
COLORREF backgroundColor = GetCustSysColor(COLOR_BTNFACE)
The background color to use for the icon.
Specifies the windows color definition. See List of Standard Color IDs. For a full list of windows color definitions, please refer to the Win32 API, in particular the methods GetSysColor() and SetSysColor().
Prototype:
virtual int GetLargeImageIndex(bool enabledVersion = true, COLORREF backgroundColor = GetCustSysColor(COLOR_BTNFACE)) = 0;
Remarks:
Returns the zero based index into the image list for the large version of this particular icon.
Parameters:
bool enabledVersion = true
Pass true to get the enabled version of the icon or false to get the disabled version.
COLORREF backgroundColor = GetCustSysColor(COLOR_BTNFACE)
The background color to use for the icon.
Specifies the windows color definition. See List of Standard Color IDs. For a full list of windows color definitions, please refer to the Win32 API, in particular the methods GetSysColor() and SetSysColor().
Prototype:
int GetDefaultImageIndex(bool enabledVersion = true, COLORREF backgroundColor = GetCustSysColor(COLOR_BTNFACE));
Remarks:
Returns the zero based index into the image list for the default version of this particular icon.
Parameters:
bool enabledVersion = true
Pass true to get the enabled version of the icon or false to get the disabled version.
COLORREF backgroundColor = GetCustSysColor(COLOR_BTNFACE)
The background color to use for the icon.
Specifies the windows color definition. See List of Standard Color IDs. For a full list of windows color definitions, please refer to the Win32 API, in particular the methods GetSysColor() and SetSysColor().
Prototype:
virtual bool UsesAlphaMask() = 0;
Remarks:
This method returns true if the icons has an alpha mask that needs to be blended with the background color and false if it doesn't use an alpha mask.