maxicon.h File Reference

maxicon.h File Reference
#include "object.h"
#include "iColorMan.h"
#include "strbasic.h"

Classes

class  MaxIcon
 
class  MaxBmpFileIcon
 Implements icon support for icon images stored as image files on disk, or compiled resources in .rcc files. More...
 

Namespaces

 MaxSDK
 This API is used to support OLE structured storage streams containing user specified string data in 3ds Max scene files or other OLE Structured Storage based files.
 

Functions

CoreExport HIMAGELIST GetIconManDefaultImageList ()
 
CoreExport HIMAGELIST GetIconManSmallImageList ()
 
CoreExport HIMAGELIST GetIconManLargeImageList ()
 
CoreExport BOOL LoadMAXFileIcon (const MCHAR *pFile, HIMAGELIST hImageList, ColorId color, BOOL disabled, BOOL applyDPIScaling=FALSE)
 Loads a bitmap file into an HIMAGELIST. More...
 
CoreExport QIcon LoadMaxMultiResIcon (const QString &iconName)
 Loads a set of Images into a multi-resolution QIcon. More...
 
CoreExport HICON CreateHICONFromMaxMultiResIcon (const MSTR &iconName, int width, int height, bool enabled=true, bool on=false)
 Create an HICON from a MaxMultiResIcon. More...
 
HICON CreateHICONFromMaxMultiResIcon (const MSTR &iconName, int size, bool enabled=true, bool on=false)
 
CoreExport HIMAGELIST CreateHIMAGELISTFromMaxMultiResIcon (const MSTR &imageIconName, int size, int count, bool alpha=true, bool enabled=true, bool on=false)
 Create an HIMAGELIST from a MaxMultiResIcon. More...
 

Function Documentation

CoreExport HIMAGELIST GetIconManDefaultImageList ( )
CoreExport HIMAGELIST GetIconManSmallImageList ( )
CoreExport HIMAGELIST GetIconManLargeImageList ( )
CoreExport BOOL LoadMAXFileIcon ( const MCHAR pFile,
HIMAGELIST  hImageList,
ColorId  color,
BOOL  disabled,
BOOL  applyDPIScaling = FALSE 
)

Loads a bitmap file into an HIMAGELIST.

Parameters
[in]pFileThe name of the bitmap file to load.
[in,out]hImageListThe HIMAGELIST to load the bitmap file into.
[in]colorThe background color
[in]disabledSpecifies whether icons show enabled or disabled state.
[in]applyDPIScalingIf true, the bitmap loaded from the file is rescaled using the UI scaling factor.
Returns
TRUE if the specified file was loaded

The icon width/height used when creating the HIMAGELIST must reflect whether DPI scaling is performed. For example:

1 HIMAGELIST hImageList = ImageList_Create(MaxSDK::GetUIScaleFactor(16), MaxSDK::GetUIScaleFactor(16), ILC_COLOR24 | ILC_MASK, 14, 0);
2 LoadMAXFileIcon(images_filename, hImageList, kBackground, FALSE, TRUE);