3ds Max C++ API 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
 

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

◆ GetIconManDefaultImageList()

CoreExport HIMAGELIST GetIconManDefaultImageList ( )

◆ GetIconManSmallImageList()

CoreExport HIMAGELIST GetIconManSmallImageList ( )

◆ GetIconManLargeImageList()

CoreExport HIMAGELIST GetIconManLargeImageList ( )

◆ LoadMAXFileIcon()

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:

HIMAGELIST hImageList = ImageList_Create(MaxSDK::GetUIScaleFactor(16), MaxSDK::GetUIScaleFactor(16), ILC_COLOR24 | ILC_MASK, 14, 0);
LoadMAXFileIcon(images_filename, hImageList, kBackground, FALSE, TRUE);
const ColorId kBackground
Definition: icolorman.h:30
CoreExport BOOL LoadMAXFileIcon(const MCHAR *pFile, HIMAGELIST hImageList, ColorId color, BOOL disabled, BOOL applyDPIScaling=FALSE)
Loads a bitmap file into an HIMAGELIST.
UtilExport float GetUIScaleFactor(int monitorID=-1)
Returns the UI scaling factor relative to a default of 96 DPI.