3ds Max C++ API Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
MaxSDK Namespace Reference

Namespaces

namespace  AssetManagement
 
namespace  ChannelData
 These are classes and enums to support the Data Channel Modifier.
 
namespace  ColorManagement
 
namespace  CUI
 
namespace  CustomFileStreamAPI
 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.
 
namespace  DebuggingTools
 
namespace  GeomBind
 These classes let you define skin weighting using a voxel or height map based algorithm.
 
namespace  Graphics
 
namespace  NotificationAPI
 
namespace  NotificationAPIUtils
 This namespace exposes 4 private internal calls to the 3dsmax application.
 
namespace  OSL
 
namespace  ParticleFlow
 
namespace  PerformanceTools
 
namespace  PointCloud
 
namespace  Populate
 
namespace  RenderingAPI
 
namespace  RenderTimeInstancing
 This API is meant to be implemented by plugins and used by renderers to instantiate objects at render-time.
 
namespace  SkinEngine
 
namespace  ThreadingDebuggingTools
 The functions in this namespace are provided to assist in debugging operations performed on a worker thread.
 
namespace  TranslationSupport
 MAXScript scripts are typically written in English, but when MAXScript accesses names from TrackView nodes only localized names are available.
 
namespace  Util
 

Classes

class  Array
 A generic array container, with proper support for non-POD types. More...
 
class  ArrayAutoPtr
 Standard implementation of a AutoPtr for pointer to array types. More...
 
class  ArrayPointerDestructor
 DestructorPolicy template for pointer to array types. More...
 
class  AutoPtr
 Automatic memory-ownership pointer supporting "resource acquisition is initialization. More...
 
struct  AutoPtrRef
 Helper class used to implement destructive copy semantics and allow for AutoPtrs to be used as return values. More...
 
class  BlockWrite_Ptr
 Holds a non-const pointer to data but restricts the ability to change the pointer itself. More...
 
class  BlockWrite_Value
 Holds a non-const copy of a value but restricts the ability to write to it. More...
 
class  DeleteThisAutoPtr
 Partial template specialization of AutoPtr for types requiring destruction through a DeleteThis method. More...
 
class  DeleteThisDestructor
 DestructorPolicy template for types requiring destruction through DeleteThis. More...
 
struct  DependentBundle
 A plugin package may contain various pieces of information including a list of packages it is dependent on. More...
 
class  HoldBegin
 
class  IActiveShadeFragmentManager
 The IActiveShadeFragmentManager class is used to control the active shade fragment (in-viewport) active shade. More...
 
class  IActiveShadeFragmentManager2
 The IActiveShadeFragmentManager2 class is used to control the ActiveShade fragment (in-viewport ActiveShade) and extends IActiveShadeFragmentManager. More...
 
class  IHairModifier
 Provides access to hair strand definitions for a modifier that generates hair. More...
 
class  IHelpSystem
 This interface provides access to the 3ds Max Help system. More...
 
class  IMaterialBrowserEntryInstanceCallback
 The IMaterialBrowserEntryInstanceCallback allows you to register a callback that gets executed when a user creates a material or texture from the material browser in the Schematic or Compact Material Editor. More...
 
class  INoSignalCheckProgress
 An alternative progress reporting interface to class RendProgressCallback, which does not process the window message queue. More...
 
class  IPhysicalCamera
 Access to the properties of the Physical Camera object. More...
 
class  IPhysicalCamera_BitmapApertureSampler
 Utility class that provides efficient sampling for a bitmap aperture on the physical camera. More...
 
class  IPhysicalCameraToneOperator
 Access to the properties of the Physical Camera Exposure Control. More...
 
class  IPhysicalSunSky
 Access to functionality and properties of the Physical Sun & Sky environment map. More...
 
class  ISceneScriptSecurityManager
 Interface class for the Scene Script Security Manager. More...
 
class  ISunPositioner
 Access to functionality and properties of the Sun Positioner object. More...
 
struct  MaxGuid
 
class  MeshChannelContainer
 Container for managing the MaxSDK::MeshChannelData objects. More...
 
class  MeshChannelData
 Base class for Mesh data channel objects. More...
 
class  MeshEdgeVisibilityChannelData
 Edge visibility channel object for Mesh, stored in the MeshChannelContainer. More...
 
class  MeshGeomChannelData
 Geometry channel object for Mesh, stored in the MeshChannelContainer. More...
 
class  MeshMaterialChannelData
 Material channel object for Mesh, stored in the MeshChannelContainer. More...
 
class  MeshTextureMapChannelData
 Texture map channel object for Mesh, stored in the MeshChannelContainer. More...
 
class  MeshTopoChannelData
 Topology channel object for Mesh, stored in the MeshChannelContainer. More...
 
class  MeshVertexColorChannelData
 Vertex color channel object for Mesh, stored in the MeshChannelContainer. More...
 
class  MNChannelContainer
 Container for managing the MaxSDK::MNChannelData objects. More...
 
class  MNChannelData
 Base class for MNMesh data channel objects. More...
 
class  MNGeomChannelData
 Geometry channel object for MNMesh, stored in the MNChannelContainer. More...
 
class  MNTextureMapChannelData
 Texture map channel object for MNMesh, stored in the MNChannelContainer. More...
 
class  MNTopoChannelData
 Topology channel object for MNMesh, stored in the MNChannelContainer. More...
 
class  MNVertexColorChannelData
 Vertex Color channel object for MNMesh, stored in the MNChannelContainer. More...
 
class  MtlSwitcherInterface
 
class  PluginPackageComponent
 A plugin package may contain various 3ds Max components, including native C++ plug-ins, managed assemblies, maxscripts, macroscripts, various resources such as icons, etc. More...
 
class  PluginPackageInfo
 A plugin package may contain various pieces of information including name, package description, company email, and so on. More...
 
class  PluginPackageManager
 The PluginPackageManager is a service implemented by 3ds Max. More...
 
class  QMaxColorSwatch
 Simple UI component to display and modify a color-value. More...
 
class  QmaxDockingWinHost
 This class acts as docking host for native win32 ui controls. More...
 
class  QmaxDockingWinHostDelegate
 
class  QmaxDockWidget
 
class  QmaxDoubleSpinBox
 3ds Max's version of a Qt QDoubleSpinBox. More...
 
class  QmaxFloatSlider
 Qt Max slider for float values. More...
 
class  QmaxLightingSpinBox
 A special QmaxDoubleSpinBox that displays its value using the current lighting units. More...
 
class  QmaxMainWindow
 This class is used by 3ds Max for its docking UI and should be used as replacement for the standard QMainWindow. More...
 
class  QmaxMatrix3Spinner
 
class  QmaxMultiSpinner
 
class  QMaxParamBlockWidget
 Base class for QWidgets which are to be controlled by a parameter block/map. More...
 
class  QmaxPoint2Spinner
 
class  QmaxPoint3Spinner
 
class  QmaxPoint4Spinner
 
class  QmaxProxyDockingWinHostDelegate
 
class  QmaxRollup
 3ds Max Qt Rollup class. More...
 
class  QmaxRollupContainer
 
class  QmaxSpinBox
 3ds Max's version of a Qt QSpinBox. More...
 
class  QmaxSpinBoxPrivate
 
class  QmaxToolBar
 This class is used by 3ds Max for the docking toolbars and should be used as replacement for the standard QToolBar. More...
 
class  QmaxToolClips
 The QmaxToolClips class provides a collection of tool clip related methods. More...
 
class  QmaxTranslationLoader
 
class  QMaxWinHost
 Simple widget that can host a native win32 window. More...
 
class  QmaxWorldSpinBox
 A special QmaxDoubleSpinBox that displays its value using the current display units like cm or inches. More...
 
class  SharedMesh
 SharedMesh is a class to share a mesh between different classes. More...
 
class  SinglePointerDestructor
 DestructorPolicy template for pointer to single object types. More...
 
class  SingleWeakRefMaker
 Utility base class for a ReferenceMaker with a single target that does not share ownership of it's ReferenceTarget. More...
 
class  TexmapThreadSafe
 TexmapThreadSafe interface has been deprecated. More...
 
class  TreeEntry
 Holds an Animatable handle, its clients handle and the subanim index such that: client->SubAnim(index) == anim. More...
 
class  TypedSingleWeakRefMaker
 
class  VariableGuard
 Resets a variable when the object goes out of scope. More...
 
class  WindowsMessageFilter
 Runs a message loop without blocking, allowing only acceptable Windows messages through to their destination UI controls. More...
 

Typedefs

typedef MaxSDK::Graphics::RefPtr< SharedMeshSharedMeshPtr
 About SharedMeshPtr defined below : This template class act similar to CComPtr.
 

Enumerations

enum  OfnCustData : LPARAM { OfnOpenDialogFlag = 0 , OfnSaveDialogFlag = 1 }
 Enum for typical usage of OPENFILENAME::lCustData to hold whether the OPENFILENAME instance is used in a GetOpenFileName or a GetSaveFileName function call. More...
 

Functions

HINSTANCE GetHInstance ()
 Get the calling module's HINSTANCE.
 
MSTR GetResourceStringAsMSTR (UINT resourceId)
 Extract a resource from the calling module's string table.
 
bool GetResourceStringAsMSTR (UINT resourceId, MSTR &resourceString)
 Extract a resource from the calling module's string table.
 
UtilExport MSTR GetResourceStringAsMSTR (HINSTANCE hinstance, UINT resourceId)
 Extract a resource from a module's string table.
 
UtilExport bool GetResourceStringAsMSTR (HINSTANCE hinstance, UINT resourceId, MSTR &resourceString)
 Extract a resource from a module's string table.
 
CoreExport QIcon LoadMaxMultiResIcon (const QString &iconName)
 Loads a set of Images into a multi-resolution QIcon.
 
CoreExport HICON CreateHICONFromMaxMultiResIcon (const MSTR &iconName, int width, int height, bool enabled=true, bool on=false)
 Create an HICON from a MaxMultiResIcon.
 
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.
 
UtilExport int QmaxMessageBox (QWidget *parent, const QString &text, const QString &caption, unsigned int type, unsigned int exType=0, DWORD *exRet=nullptr)
 Provides an extended message box functionality. This is used to support message dialogs with a 'Hold', a 'Help' button and/or a 'Do not show this message again' check box.
 
 Q_DECLARE_METATYPE (AColor)
 
 Q_DECLARE_METATYPE (Point2)
 
 Q_DECLARE_METATYPE (Point3)
 
 Q_DECLARE_METATYPE (Point4)
 
 Q_DECLARE_METATYPE (Matrix3)
 
QString QStringFromID (int resourceID)
 
IPhysicalCamera_BitmapApertureSampler::RGBValue operator* (const float a, const IPhysicalCamera_BitmapApertureSampler::RGBValue &b)
 
IPhysicalCamera_BitmapApertureSampler::RGBValue operator* (const IPhysicalCamera_BitmapApertureSampler::RGBValue &a, const float b)
 
IPhysicalCamera_BitmapApertureSampler::RGBValue operator* (const IPhysicalCamera_BitmapApertureSampler::RGBValue &a, const IPhysicalCamera_BitmapApertureSampler::RGBValue &b)
 
IPhysicalCamera_BitmapApertureSampler::RGBValue operator+ (const IPhysicalCamera_BitmapApertureSampler::RGBValue &a, const IPhysicalCamera_BitmapApertureSampler::RGBValue &b)
 
IPhysicalCamera_BitmapApertureSampler::RGBValue operator- (const IPhysicalCamera_BitmapApertureSampler::RGBValue &a, const IPhysicalCamera_BitmapApertureSampler::RGBValue &b)
 
CoreExport bool PerformAssignController (QWidget *dialogParent, const geo::span< TreeEntry > list, MaxSDK::Array< Control * > &newControllersOut, bool clearMot=true)
 Procedure to assign new controllers to the entries in the 'list':
 
CoreExport void OpenEditTrackParams (MaxSDK::TreeEntry entry, TimeValue time, HWND handle, IObjParam *objParams, DWORD flags)
 Try to open the floating dialog for the Animatable described by the entry parameter.
 
CoreExport bool PopulateControllerContextMenu (QMenu *contextMenu, QWidget *parent, geo::span< MaxSDK::TreeEntry > entries, bool suspendCommandPanel, bool enabledState)
 Populate a QMenu with actions to manipulate controllers.
 
template<typename T1 , typename T2 >
constexpr auto min (const T1 &a, const T2 &b) noexcept
 
template<typename T1 , typename T2 >
constexpr auto max (const T1 &a, const T2 &b) noexcept
 
UtilExport float GetUIScaleFactor (int monitorID=-1)
 Returns the UI scaling factor relative to a default of 96 DPI.
 
UtilExport float GetUIUserScaleFactor ()
 Get the additional user UI scaling factor.
 
template<typename T >
UIScaled (T value, int monitorID=-1)
 Returns the given value multiplied with the UI scaling factor.
 
template<typename T >
UIUnScaled (T value, int monitorID=-1)
 Returns the given value divided with the UI scaling factor.
 
void ScaleRect (RECT &rect, int monitorID=-1)
 Scaling of a rectangle values based on UIScaleFactor.
 
void UnscaleRect (RECT &rect, int monitorID=-1)
 Unscaling of a rectangle values based on UIScaleFactor.
 
UtilExport HBITMAP GetUIScaledBitmap (HBITMAP bitmap, int monitorID=-1)
 Returns a scaled copy of the bitmap if the UI scaling factor is not 1.0.
 
UtilExport HRESULT AnnotateControlName (HWND hWnd, const MSTR &name)
 Annotates the control with Microsoft Active Accessibility name property.
 
UtilExport HRESULT RemoveAnnotatedNameFromControl (HWND hWnd)
 Removes the Microsoft Active Accessibility name from the control.
 
CoreExport void ScaleFileOpenSaveDialogToolbar (HWND hDlg)
 Scales the toolbar size and icons in standard file open/save dialogs.
 
CoreExport bool ValidateFileNameLength (HWND hDlg, tagOFNW *lpofn, const TSTR &messageBoxTitle)
 Validates the file name length in file open / save dialog proc.
 
CoreExport INT_PTR WINAPI MinimalMaxFileOpenHookProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 A minimal LPOFNHOOKPROC for scaling the toolbar size and icons in standard file open/save dialogs.
 
CoreExport INT_PTR WINAPI MinimalMaxFileOpenSaveHookProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 A minimal LPOFNHOOKPROC for scaling the toolbar size and icons in standard file open/save dialogs.
 
UtilExport int MaxMessageBox (HWND parent, const MSTR &text, const MSTR &caption, unsigned int type, unsigned int exType=0, DWORD *exRet=nullptr)
 Provides an extended message box functionality. This is used to support message dialogs with a 'Hold', a 'Help' button and/or a 'Do not show this message again' check box.
 
CoreExport bool SearchComboBox (HWND hWnd, MCHAR key, const MCHAR *szTrim=NULL)
 Multiple character search for ComboBoxes.
 
CoreExport bool SearchListBox (HWND hWnd, MCHAR key, const MCHAR *szTrim=NULL)
 Multiple character search for ListBoxes.
 
CoreExport int GetDefaultToolTipMaxWidth ()
 

Typedef Documentation

◆ SharedMeshPtr

About SharedMeshPtr defined below : This template class act similar to CComPtr.

Using RefPtr<RefObjectType> will be much safer than RefObjectType* since this template class handles the AddRef and Release in its constructor and destructor.

Usage Example: class DerivedRefObject : public ARefObject { public: void foo(); };

Use DerivedRefObject without RefPtr: { DerivedRefObject* pObject = new DerivedRefObject; pObject->AddRef(); // Add reference pObject->foo(); pObject->Release(); // release the object pObject = NULL; }

Use DerivedRefObject with RefPtr: { RefPtr<DerivedRefObject> pObject = new DerivedRefObject; pObject->foo(); don't need to worry about deleting this object }

More RefPtr examples: RefPtr<DerivedRefObject> pObject2 = new DerivedRefObject; RefPtr<DerivedRefObject> pObject3 = pObject2; pObject2 = NULL; // pObject3 is still valid. pObject3->foo(); pObject3 = NULL; // Release the last reference to the object and the object is destroyed automatically.

Enumeration Type Documentation

◆ OfnCustData

enum OfnCustData : LPARAM

Enum for typical usage of OPENFILENAME::lCustData to hold whether the OPENFILENAME instance is used in a GetOpenFileName or a GetSaveFileName function call.

Typically used to determine proper messages to be displayed or logged.

See also
MinimalMaxFileOpenSaveHookProc
Enumerator
OfnOpenDialogFlag 
OfnSaveDialogFlag 
184 {
187 };
@ OfnSaveDialogFlag
Definition: winutil.h:186
@ OfnOpenDialogFlag
Definition: winutil.h:185

Function Documentation

◆ GetHInstance()

HINSTANCE GetHInstance ( )
inline

Get the calling module's HINSTANCE.

Returns
Handle pointing to the start of the calling module.
29{
30 return reinterpret_cast<HINSTANCE>(&__ImageBase);
31}
EXTERN_C IMAGE_DOS_HEADER __ImageBase
Definition: dllutilities.h:16

◆ GetResourceStringAsMSTR() [1/4]

MSTR GetResourceStringAsMSTR ( UINT  resourceId)
inline

Extract a resource from the calling module's string table.

GetResourceStringAsMSTR is essentially a thread-safe wrapper around the Win32 API's LoadString, but it saves client code from the bother of dealing with its HINSTANCE, of maintaining a buffer, and reduces duplicated code.

Parameters
resourceIdIdentifier for the desired string resource within the calling module's string table.
Returns
An MSTR containing the resource string, empty if the requested resource is not found.
47{
49}
MSTR GetResourceStringAsMSTR(UINT resourceId)
Extract a resource from the calling module's string table.
Definition: dllutilities.h:46
HINSTANCE GetHInstance()
Get the calling module's HINSTANCE.
Definition: dllutilities.h:28

◆ GetResourceStringAsMSTR() [2/4]

bool GetResourceStringAsMSTR ( UINT  resourceId,
MSTR resourceString 
)
inline

Extract a resource from the calling module's string table.

GetResourceStringAsMSTR is essentially a thread-safe wrapper around the Win32 API's LoadString, but it saves client code from the bother of dealing with its HINSTANCE, of maintaining a buffer, and reduces duplicated code.

Parameters
resourceIdIdentifier for the desired string resource within the calling module's string table.
resourceStringUpdated to contain the resource string if the requested resource is not found.
Returns
true if the requested resource is found, false if not
64{
65 return MaxSDK::GetResourceStringAsMSTR(GetHInstance(), resourceId, resourceString);
66
67}

◆ GetResourceStringAsMSTR() [3/4]

UtilExport MSTR GetResourceStringAsMSTR ( HINSTANCE  hinstance,
UINT  resourceId 
)

Extract a resource from a module's string table.

GetResourceString is essentially a thread-safe wrapper around the Win32 API's LoadString, but it saves client code from the bother of maintaining a buffer and reduces duplicated code. Optimally, GetResourceString should be called through the single-parameter version from dllutilities.h.

Parameters
hinstanceHandle to the module whose string table will be queried for the resource.
resourceIdIdentifier for the desired string resource within the calling module's string table.
Returns
An MSTR containing the resource string, empty if the requested resource is not found.

◆ GetResourceStringAsMSTR() [4/4]

UtilExport bool GetResourceStringAsMSTR ( HINSTANCE  hinstance,
UINT  resourceId,
MSTR resourceString 
)

Extract a resource from a module's string table.

GetResourceString is essentially a thread-safe wrapper around the Win32 API's LoadString, but it saves client code from the bother of maintaining a buffer and reduces duplicated code. Optimally, GetResourceString should be called through the single-parameter version from dllutilities.h.

Parameters
hinstanceHandle to the module whose string table will be queried for the resource.
resourceIdIdentifier for the desired string resource within the calling module's string table.
resourceStringUpdated to contain the resource string if the requested resource is not found.
Returns
true if the requested resource is found, false if not

◆ LoadMaxMultiResIcon()

CoreExport QIcon LoadMaxMultiResIcon ( const QString &  iconName)

Loads a set of Images into a multi-resolution QIcon.

This function looks into the UI_ln folder of the 3dsmax installation (or the internal Qt resource system) to find a set of matching image files to mark for usage. The actual images get loaded on demand.

The naming of those files has to match one of the following schemes:

[:/]Folder/BaseName[_on|_off][_size].ext
[:/]Folder/BaseName[_on|_off][_(width)x(height)].ext
controller mat max min numsubs x z controller keys x z controller keys x
Definition: generics.inl:212

So for example:

iconName files on disk QIcon entry size QIcon state
Undo Undo_16.png 16 x 16px Off
Undo Undo_off_24.png 24 x 24px Off
Undo Undo_on_32.png 32 x 32px On
Undo Undo_on_100.png 100 x 100px On
Undo Undo_16x32.png 16 x 32px Off
Undo Undo_on_16x32.png 16 x 32px On

In that case a single call on LoadMaxMultiResIcon( "Undo" ) would produce an QIcon containing all the different sizes and states.

iconName files on disk QIcon entry size QIcon state
Redo.png Redo.png based on file[^1] Off
Redo.png Redo_on.png based on file[^1] On

[^1]: This forces the QIcon to load the image file to determine its actual size.

iconName files on disk QIcon entry size QIcon state
Fancy.jpg Fancy_300x100.jpg 300 x 100px Off
Fancy.jpg Fancy_150x50.jpg 150 x 50px Off

The iconName may also contain folders or sub-folders, so these fileNames are fine, too (slashes or backslashes can be used):

"SME/Editor.png" "SME/Nodes/Collapse.png" "SME\\Nodes\\RemoveItem.png"

Based on the current 3dsmax theme (Dark/Light) the icons are retrieved from different locations on the file-system, so depending on the setting "SME/Editor.png" may get:

UI_ln/Icons/Dark/SME/Editor*.png UI_ln/Icons/Light/SME/Editor*.png

If the iconName starts with ":/", it points to a Qt Resource like ":/Icons/Undo", the theming is not automatically applied, so the caller is responsible to actually provide the correct resource-bundle. Nevertheless the QIcons internal pixmap cache will be wiped on a theme change, so the next paint call on the QIcon will reload the acquired version.

If a size of an image inside an QIcon is not available but requested for painting, Qt will downscale the next bigger version automatically - but will never scale images up.

Parameters
[in]iconNameThe name of the icon to load. The path, basename and the extension of the file is used to find matching icons. The Extension may be omitted and .png is assumed to be the default extension.
Returns
A QIcon that contains all the images that matches the given iconName. Might be an empty QIcon if no match could be found.
See also
QIcon class in the Qt documentation, Qt Resource System

◆ CreateHICONFromMaxMultiResIcon() [1/2]

CoreExport HICON CreateHICONFromMaxMultiResIcon ( const MSTR iconName,
int  width,
int  height,
bool  enabled = true,
bool  on = false 
)

Create an HICON from a MaxMultiResIcon.

Loads a QIcon using LoadMaxMultiResIcon, and tries to extract a HICON from it using the given size, mode and state settings. For a detailed description on the iconName syntax, please have a closer look at the LoadMaxMultiResIcon function. The HICON returned might be smaller than requested, but never larger.

Convenience method for legacy usage, for example when using one size of a multi-resolution-icon in a win32 HMENU. Note that the resulting HICON wont refresh itself on a theme change, as the QIcon does.

Parameters
[in]iconNameThe name of the icon to load. This may be the actual filename, but also can be some folder/basename combination, as described in detail in LoadMaxMultiResIcon.
[in]widthThe (maximum) width of the image to be loaded.
[in]heightThe (maximum) height of the image to be loaded.
[in]enabledSets, if an enabled or disabled version of the icon should be retrieved (QIcon::Normal vs QIcon::Disabled)
[in]onSets, if the On or Off state of the icon should be retrieved (QIcon::On vs QIcon::Off).
Returns
A new HICON for the given parameters, if available, a nullptr otherwise. The HICON might be smaller than requested, but never larger.
See also
LoadMaxMultiResIcon, QIcon::Mode, QIcon::State

◆ CreateHICONFromMaxMultiResIcon() [2/2]

HICON CreateHICONFromMaxMultiResIcon ( const MSTR iconName,
int  size,
bool  enabled = true,
bool  on = false 
)
inline
338 {
339 return CreateHICONFromMaxMultiResIcon( iconName, size, size, enabled, on );
340 }
CoreExport HICON CreateHICONFromMaxMultiResIcon(const MSTR &iconName, int width, int height, bool enabled=true, bool on=false)
Create an HICON from a MaxMultiResIcon.

◆ CreateHIMAGELISTFromMaxMultiResIcon()

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.

Loads a QIcon using LoadMaxMultiResIcon, and tries to convert it to a HIMAGELIST using the given size, mode and state settings. For a detailed description on the iconName syntax, please have a closer look at the LoadMaxMultiResIcon function.

Parameters
[in]imageIconNameThe name of the icon to load. This may be the actual filename, but also can be some folder/basename combination, as described in detail in LoadMaxMultiResIcon.
[in]sizeThe width and height of the component icons in the image to be loaded.
[in]countThe number of component icons in the image to be loaded.
[in]alphaSets, if alpha channel in icon should be used when creating the bitmap from the QIcon
[in]enabledSets, if an enabled or disabled version of the icon should be retrieved (QIcon::Normal vs QIcon::Disabled)
[in]onSets, if the On or Off state of the icon should be retrieved (QIcon::On vs QIcon::Off).
Returns
A new HIMAGELIST for the given parameters, if available, a nullptr otherwise.
See also
LoadMaxMultiResIcon, QIcon::Mode, QIcon::State

◆ QmaxMessageBox()

UtilExport int QmaxMessageBox ( QWidget *  parent,
const QString &  text,
const QString &  caption,
unsigned int  type,
unsigned int  exType = 0,
DWORD *  exRet = nullptr 
)

Provides an extended message box functionality. This is used to support message dialogs with a 'Hold', a 'Help' button and/or a 'Do not show this message again' check box.

The first four parameters correspond to the Win32 MessageBox method parameters, but not all Win32 MessageBox functionality is supported. The last two optional arguments add the extended functionality - exType is used for adding the additional buttons, and exRet is used for getting the extra return info. MaxSDK::MaxMessageBox and MaxSDK::QmaxMessageBox should be used in preference to Win32 MessageBox due to string clipping that can occur with Win32 MessageBox in some locales with some font types and sizes on Windows 10 when dpi scaling is greater than 100%.

Parameters
parent- The parent QWidget
text- The main message
caption- The caption or title for the message window
type- The type of message box. The supported types are:
  • MB_YESNO
  • MB_OK
  • MB_YESNOCANCEL
  • MB_OKCANCEL
  • MB_ABORTRETRYIGNORE
  • MB_RETRYCANCEL
  • MB_CANCELTRYCONTINUE The following Win32 MessageBox flags are supported:
  • MB_DEFBUTTON*
  • MB_SYSTEMMODAL
  • MB_TOPMOST The following Win32 MessageBox flags are not supported and will be ignored:
  • MB_TASKMODAL
  • MB_NOFOCUS
  • MB_SETFOREGROUND
  • MB_RIGHT
  • MB_RTLREADING The MB_HELP flag is supported, albeit in a manner different than Win32 MessageBox. If specified and 'exRet' is not null, a Help button is displayed and clicking it causes 3ds Max Help to be displayed using the help topic id that is passed through 'exRet'. The MB_DEFBUTTON* flag applies to the standard message box buttons, and does not apply to the optional Help and Hold buttons
exType- Used for adding additional UI elements. The supported bit field values are:
  • MAX_MB_HOLD - display a 'Hold' button.
  • MAX_MB_DONTSHOWAGAIN - display a 'Do not show this message again' check box
exRet- Used for specifying the help file topic id and for returning extra info:
  • if MAX_MB_DONTSHOWAGAIN is specified as part of 'exType', on return the MAX_MB_DONTSHOWAGAIN bit will or will not be set in 'exRet' based on check box setting.
  • if MAX_MB_HOLD is specified as part of 'exType', if the button is pressed the MAX_MB_HOLD bit will set in 'exRet' and a value of IDOK is returned.
Note
See "https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-messagebox" for a description of the Win32 MessageBox method parameters.

◆ Q_DECLARE_METATYPE() [1/5]

Q_DECLARE_METATYPE ( AColor  )

◆ Q_DECLARE_METATYPE() [2/5]

Q_DECLARE_METATYPE ( Point2  )

◆ Q_DECLARE_METATYPE() [3/5]

Q_DECLARE_METATYPE ( Point3  )

◆ Q_DECLARE_METATYPE() [4/5]

Q_DECLARE_METATYPE ( Point4  )

◆ Q_DECLARE_METATYPE() [5/5]

Q_DECLARE_METATYPE ( Matrix3  )

◆ QStringFromID()

QString QStringFromID ( int  resourceID)
inline
24{
25 return QString(MaxSDK::GetResourceStringAsMSTR(resourceID));
26}

◆ operator*() [1/3]

36{
37 return IPhysicalCamera_BitmapApertureSampler::RGBValue(a * b.r, a * b.g, a * b.b);
38}
A simple RGB color value. the Max SDK's Color class couldn't be used since we want to remain independ...
Definition: IPhysicalCamera_BitmapApertureSampler.h:36
float r
Definition: IPhysicalCamera_BitmapApertureSampler.h:41
float b
Definition: IPhysicalCamera_BitmapApertureSampler.h:41
float g
Definition: IPhysicalCamera_BitmapApertureSampler.h:41

◆ operator*() [2/3]

41{
42 return b * a;
43}

◆ operator*() [3/3]

◆ operator+()

◆ operator-()

◆ PerformAssignController()

CoreExport bool PerformAssignController ( QWidget *  dialogParent,
const geo::span< TreeEntry list,
MaxSDK::Array< Control * > &  newControllersOut,
bool  clearMot = true 
)

Procedure to assign new controllers to the entries in the 'list':

  1. Display the assign controller dialog
  2. Disables the command panel if its on the motion panel
  3. Replaces the selected controllers with the new selected one
  4. Re-enabled the command panel
  5. Redraw views.
    Parameters
    dialogParentParent to the assign controller dialog.
    listList of destinations for the new controller.
    newControllersOutList of the newly created controllers corresponding to the input 'list'.
    clearMotShould be true if during the assignment of the new controllers the motion panel should be closed.
    Returns
    Returns true if successful.

◆ OpenEditTrackParams()

CoreExport void OpenEditTrackParams ( MaxSDK::TreeEntry  entry,
TimeValue  time,
HWND  handle,
IObjParam objParams,
DWORD  flags 
)

Try to open the floating dialog for the Animatable described by the entry parameter.

Parameters
entryThe Animatable whose parameter dialog we want to open with its parent context.
timeThis time represents the horizontal position of where the user right clicked to bring up the modal edit track parameters dialog. See the flags below for when this parameter is valid.
handleThe handle to the parent window that should be used to create the dialogs.
objParamsAn interface pointer available for calling functions in 3ds Max.
flagsOne or more of the following values:

EDITTRACK_FCURVE
The user is in the function curve editor.

EDITTRACK_TRACK
The user is in one of the track views.

EDITTRACK_SCENE
The user is editing a path in the scene.

EDITTRACK_BUTTON
The user invoked by choosing the properties button. In this case the time parameter is NOT valid.

EDITTRACK_MOUSE
The user invoked by right clicking with the mouse. In this case the time parameter is valid.

◆ PopulateControllerContextMenu()

CoreExport bool PopulateControllerContextMenu ( QMenu *  contextMenu,
QWidget *  parent,
geo::span< MaxSDK::TreeEntry entries,
bool  suspendCommandPanel,
bool  enabledState 
)

Populate a QMenu with actions to manipulate controllers.

Parameters
contextMenuExisting QMenu to add the action items to.
parentParent for any dialogs that open as a result of the added actions.
entriesList of entries to perform the added actions upon.
suspendCommandPanelTrue to clear the command panel during paste or assign control actions. Ex: If contextMenu is popped from a UI control in the command panel, then pass false.
enabledStateSet to false to disable all added menu actions.
Returns
Returns true if successful.

◆ min()

constexpr auto min ( const T1 &  a,
const T2 &  b 
)
inlineconstexprnoexcept
32 {
33 static_assert(!std::is_same<T1, T2>::value, "T1 == T2. Use std::min instead");
34 static_assert(std::is_scalar<T1>::value && std::is_scalar<T2>::value, "T1 and T2 must be scalar types");
35 return a < b ? a : b;
36 }

◆ max()

constexpr auto max ( const T1 &  a,
const T2 &  b 
)
inlineconstexprnoexcept
41 {
42 static_assert(!std::is_same<T1, T2>::value, "T1 == T2. Use std::max instead");
43 static_assert(std::is_scalar<T1>::value && std::is_scalar<T2>::value, "T1 and T2 must be scalar types");
44 return b < a ? a : b;
45 }

◆ GetUIScaleFactor()

UtilExport float GetUIScaleFactor ( int  monitorID = -1)

Returns the UI scaling factor relative to a default of 96 DPI.

The function reads the systems monitor settings and calculates the scaling factor based on the vertical logical DPI (what can be set and changed through the windows OS control panel). It will return 1.0f, if some value couldn't be retrieved or calculated, or a calculation result will be 0.0f; so it is safe to use the result of this function to simply multiply UI sizes without further checking.

Parameters
[in]monitorIDThe index of the monitor to get the actual logical vertical DPI from. Default value is set to -1, which means the primary system monitor.
Returns
The scaling factor, if it could be retrieved and calculated, 1.0f in other cases.

◆ GetUIUserScaleFactor()

UtilExport float GetUIUserScaleFactor ( )

Get the additional user UI scaling factor.

Returns
The users ui scaling factor.
See also
SetUIUserScaleFactor, GetUIScaleFactor

◆ UIScaled()

T UIScaled ( value,
int  monitorID = -1 
)
inline

Returns the given value multiplied with the UI scaling factor.

Parameters
[in]valueThe value which should be dpi scaled.
[in]monitorIDThe index of the monitor to get the actual logical vertical dpi from. Default value is set to -1, which means the primary system monitor.
Returns
The dpi scaled value.
See also
GetUIScaleFactor
67 {
68 static_assert(std::is_arithmetic_v<T>, "T must be arithmetic type");
69 return static_cast<T>(value * GetUIScaleFactor(monitorID));
70 }
UtilExport float GetUIScaleFactor(int monitorID=-1)
Returns the UI scaling factor relative to a default of 96 DPI.

◆ UIUnScaled()

T UIUnScaled ( value,
int  monitorID = -1 
)
inline

Returns the given value divided with the UI scaling factor.

Use this function to do an unscaling of a previous dpi scaled value.

Parameters
[in]valueThe value which should be dpi unscaled.
[in]monitorIDThe index of the monitor to get the actual logical vertical dpi from. Default value is set to -1, which means the primary system monitor.
Returns
The dpi unscaled value.
See also
UIScaled, GetUIScaleFactor
85 {
86 static_assert(std::is_arithmetic_v<T>, "T must be arithmetic type");
87 return static_cast<T>(value / GetUIScaleFactor(monitorID));
88 }

◆ ScaleRect()

void ScaleRect ( RECT &  rect,
int  monitorID = -1 
)
inline

Scaling of a rectangle values based on UIScaleFactor.

Parameters
[in,out]rectRECT struct to be scaled to UIScaleFactor
[in]monitorIDThe index of the monitor to get the actual logical vertical dpi from. Default value is set to -1, which means the primary system monitor.
100 {
101 float scaleFactor = GetUIScaleFactor( monitorID );
102 rect.top = (LONG)(rect.top * scaleFactor);
103 rect.bottom = (LONG)(rect.bottom * scaleFactor);
104 rect.left = (LONG)(rect.left * scaleFactor);
105 rect.right = (LONG)(rect.right * scaleFactor);
106 }

◆ UnscaleRect()

void UnscaleRect ( RECT &  rect,
int  monitorID = -1 
)
inline

Unscaling of a rectangle values based on UIScaleFactor.

Parameters
[in,out]rectRECT struct to be unscaled to UIScaleFactor
[in]monitorIDThe index of the monitor to get the actual logical vertical dpi from. Default value is set to -1, which means the primary system monitor.
117 {
118 float scaleFactor = GetUIScaleFactor( monitorID );
119 rect.top = (LONG)(rect.top / scaleFactor);
120 rect.bottom = (LONG)(rect.bottom / scaleFactor);
121 rect.left = (LONG)(rect.left / scaleFactor);
122 rect.right = (LONG)(rect.right / scaleFactor);
123 }

◆ GetUIScaledBitmap()

UtilExport HBITMAP GetUIScaledBitmap ( HBITMAP  bitmap,
int  monitorID = -1 
)

Returns a scaled copy of the bitmap if the UI scaling factor is not 1.0.

Parameters
[in]bitmapThe bitmap to be dpi scaled.
[in]monitorIDThe index of the monitor to get the actual logical vertical dpi from. Default value is set to -1, which means the primary system monitor.
Returns
The dpi scaled bitmap if the UI scaling factor is not 1.0, otherwise null.

◆ AnnotateControlName()

UtilExport HRESULT AnnotateControlName ( HWND  hWnd,
const MSTR name 
)

Annotates the control with Microsoft Active Accessibility name property.

Parameters
[in]hWndThe window handle of the control to be annotated
[in]nameThe name annotated to the control
Returns
S_OK or the error codes

◆ RemoveAnnotatedNameFromControl()

UtilExport HRESULT RemoveAnnotatedNameFromControl ( HWND  hWnd)

Removes the Microsoft Active Accessibility name from the control.

Parameters
[in]hWndThe window handle of the control to be removed annotation
Returns
S_OK or the error codes

◆ ScaleFileOpenSaveDialogToolbar()

CoreExport void ScaleFileOpenSaveDialogToolbar ( HWND  hDlg)

Scales the toolbar size and icons in standard file open/save dialogs.

Scales the toolbar containing the 'Go To Last Folder Visisted', 'Up One Level', 'Create New Folder' buttons, and the 'View Menu' dropdown, by the system dpi scaling value. The hDlg parameter is HWND passed to the LPOFNHOOKPROC specified in the OPENFILENAME structure. Technically, this HWND is a child of the win32 file open / save dialog

static INT_PTR WINAPI MinimalMaxFileOpenHookProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case WM_INITDIALOG:
...
CoreExport INT_PTR WINAPI MinimalMaxFileOpenHookProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
A minimal LPOFNHOOKPROC for scaling the toolbar size and icons in standard file open/save dialogs.
CoreExport void ScaleFileOpenSaveDialogToolbar(HWND hDlg)
Scales the toolbar size and icons in standard file open/save dialogs.
Parameters
[in]hDlgThe dialog's HWND.

◆ ValidateFileNameLength()

CoreExport bool ValidateFileNameLength ( HWND  hDlg,
tagOFNW *  lpofn,
const TSTR messageBoxTitle 
)

Validates the file name length in file open / save dialog proc.

Parameters
[in]hDlgThe window handle passed to the dialog proc
[in]lpofnPointer to the OPENFILENAME instance.
[in]messageBoxTitleThe title of the message box displayed if filename specified is > MAX_PATH characters
Returns
true if the file name length is valid, false if not.
See also
MinimalMaxFileOpenHookProc
Note
The underlying windows proc for file open / save dialogs does not behave as expected if a filename is selected that is longer that the file name buffer in the OPENFILENAME instance. The proc returns success, but the content of the file name buffer is the size of the buffer that is required to hold the selected filename. This method detects this case, and the case where the filename is a long file name (file name starts with "\\?"). 3ds Max does not support this type of long file name. This function should be called from the proc when handling message WM_NOTIFY, code CDN_FILEOK, and return TRUE if this function returns false.
OPENFILENAME resolves to tagOFNW

◆ MinimalMaxFileOpenHookProc()

CoreExport INT_PTR WINAPI MinimalMaxFileOpenHookProc ( HWND  hDlg,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

A minimal LPOFNHOOKPROC for scaling the toolbar size and icons in standard file open/save dialogs.

Use this LPOFNHOOKPROC when customization of the Open/Save File dialog is being not performed.
Example usage:

OPENFILENAME ofn;
memset(&ofn, 0, sizeof(ofn));
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.Flags = OFN_HIDEREADONLY | OFN_EXPLORER | OFN_ENABLEHOOK | OFN_ENABLESIZING;
ofn.lpfnHook = (LPOFNHOOKPROC)MaxSDK::MinimalMaxFileOpenHookProc;
...
BOOL res = GetOpenFileName(&ofn);

Implementation:

INT_PTR WINAPI MaxSDK::MinimalMaxFileOpenHookProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
if (message == WM_INITDIALOG)
{
}
else if (message == WM_NOTIFY)
{
LPNMHDR pMNHDR = (LPNMHDR)lParam;
const UINT code = pMNHDR->code;
if (code == CDN_FILEOK)
{
LPOPENFILENAME lpofn = reinterpret_cast<LPOFNOTIFY>(lParam)->lpOFN;
TSTR messageBoxTitle = getResMgr().getString(IDS_DS_OPENFILE, getResMgr().getHInst(RES_ID_DS));
if (!ValidateFileNameLength(lpofn, messageBoxTitle)
return TRUE;
}
}
return FALSE;
}
CoreExport bool ValidateFileNameLength(HWND hDlg, tagOFNW *lpofn, const TSTR &messageBoxTitle)
Validates the file name length in file open / save dialog proc.
#define TSTR
Definition: strclass.h:1114
Note
MinimalMaxFileOpenSaveHookProc should preferentially be used as it displays a more accurate warning message since it knows via ofn.lCustData whether it is being used in an Open or Save dialog.
The size of the OPENFILENAME lpstrFile string buffer should be at least MAX_PATH, and at least 2000 if OFN_ALLOWMULTISELECT is specified.

◆ MinimalMaxFileOpenSaveHookProc()

CoreExport INT_PTR WINAPI MinimalMaxFileOpenSaveHookProc ( HWND  hDlg,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

A minimal LPOFNHOOKPROC for scaling the toolbar size and icons in standard file open/save dialogs.

Use this LPOFNHOOKPROC when customization of the Open/Save File dialog is being not performed. ofn.lCustData specifies whether being used in an Open or Save dialog. Example usage:

OPENFILENAME ofn;
memset(&ofn, 0, sizeof(ofn));
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.Flags = OFN_HIDEREADONLY | OFN_EXPLORER | OFN_ENABLEHOOK | OFN_ENABLESIZING | OFN_OVERWRITEPROMPT;
ofn.lCustData = MaxSDK::OfnSaveDialogFlag;
ofn.lpfnHook = (LPOFNHOOKPROC)MaxSDK::MinimalMaxFileOpenSaveHookProc;
...
BOOL res = GetSaveFileName(&ofn);
or
OPENFILENAME ofn;
memset(&ofn, 0, sizeof(ofn));
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.Flags = OFN_HIDEREADONLY | OFN_EXPLORER | OFN_ENABLEHOOK | OFN_ENABLESIZING;
ofn.lCustData = MaxSDK::OfnOpenDialogFlag;
ofn.lpfnHook = (LPOFNHOOKPROC)MaxSDK::MinimalMaxFileOpenSaveHookProc;
...
BOOL res = GetOpenFileName(&ofn);
CoreExport INT_PTR WINAPI MinimalMaxFileOpenSaveHookProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
A minimal LPOFNHOOKPROC for scaling the toolbar size and icons in standard file open/save dialogs.

The implementation of this method is identical to MinimalMaxFileOpenHookProc exception for the contents of the warning MessageBox when path name is too long.

Note
The size of the OPENFILENAME lpstrFile string buffer should be at least MAX_PATH, and at least 2000 if OFN_ALLOWMULTISELECT is specified.

◆ MaxMessageBox()

UtilExport int MaxMessageBox ( HWND  parent,
const MSTR text,
const MSTR caption,
unsigned int  type,
unsigned int  exType = 0,
DWORD *  exRet = nullptr 
)

Provides an extended message box functionality. This is used to support message dialogs with a 'Hold', a 'Help' button and/or a 'Do not show this message again' check box.

The first four parameters correspond to the Win32 MessageBox method parameters, but not all Win32 MessageBox functionality is supported. The last two optional arguments add the extended functionality - exType is used for adding the additional buttons, and exRet is used for getting the extra return info. MaxSDK::MaxMessageBox and MaxSDK::QmaxMessageBox should be used in preference to Win32 MessageBox due to string clipping that can occur with Win32 MessageBox in some locales with some font types and sizes on Windows 10 when dpi scaling is greater than 100%.

Parameters
parent- The parent QWidget
text- The main message
caption- The caption or title for the message window
type- The type of message box. The supported types are:
  • MB_YESNO
  • MB_OK
  • MB_YESNOCANCEL
  • MB_OKCANCEL
  • MB_ABORTRETRYIGNORE
  • MB_RETRYCANCEL
  • MB_CANCELTRYCONTINUE The following Win32 MessageBox flags are supported:
  • MB_DEFBUTTON*
  • MB_SYSTEMMODAL
  • MB_TOPMOST The following Win32 MessageBox flags are not supported and will be ignored:
  • MB_TASKMODAL
  • MB_NOFOCUS
  • MB_SETFOREGROUND
  • MB_RIGHT
  • MB_RTLREADING The MB_HELP flag is supported, albeit in a manner different than Win32 MessageBox. If specified and 'exRet' is not null, a Help button is displayed and clicking it causes 3ds Max Help to be displayed using the help topic id that is passed through 'exRet'. The MB_DEFBUTTON* flag applies to the standard message box buttons, and does not apply to the optional Help and Hold buttons
exType- Used for adding additional UI elements. The supported bit field values are:
  • MAX_MB_HOLD - display a 'Hold' button.
  • MAX_MB_DONTSHOWAGAIN - display a 'Do not show this message again' check box
exRet- Used for specifying the help file topic id and for returning extra info:
  • if MAX_MB_DONTSHOWAGAIN is specified as part of 'exType', on return the MAX_MB_DONTSHOWAGAIN bit will or will not be set in 'exRet' based on check box setting.
  • if MAX_MB_HOLD is specified as part of 'exType', if the button is pressed the MAX_MB_HOLD bit will set in 'exRet' and a value of IDOK is returned.
Note
See "https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-messagebox" for a description of the Win32 MessageBox method parameters.

◆ SearchComboBox()

CoreExport bool SearchComboBox ( HWND  hWnd,
MCHAR  key,
const MCHAR szTrim = NULL 
)

Multiple character search for ComboBoxes.

This method will select an entry in the ComboBox based on the multiple key entries over a set time period. The functionality mimics the standard windows ListView behavior, including the documented one second time period for key entries. It is intended to be used in conjunction with the WM_CHAR message in the ComboBox's callback.

Example usage:

case WM_CHAR:
return MaxSDK::SearchComboBox( hWnd, (MCHAR)wParam, _M(" "));
CoreExport bool SearchComboBox(HWND hWnd, MCHAR key, const MCHAR *szTrim=NULL)
Multiple character search for ComboBoxes.
#define _M(x)
Used to wrap string literals.
Definition: strbasic.h:67
#define MCHAR
MBCS/Unicode helper defines std::wofstream doesn't mix well with Unicode.
Definition: strbasic.h:42
Parameters
[in]hWndWindow handle of ComboBox
[in]keyCharacter entered by user
[in]szTrimOptional parameter. Default is NULL. Any leading characters in the ComboBox entries that are contained in szTrim will be removed prior to comparing to the search string.
Returns
true if match found, false if not

◆ SearchListBox()

CoreExport bool SearchListBox ( HWND  hWnd,
MCHAR  key,
const MCHAR szTrim = NULL 
)

Multiple character search for ListBoxes.

This method will select an entry in the ListBox based on the multiple key entries over a set time period. The functionality mimics the standard windows ListView behavior, including the documented one second time period for key entries. It is intended to be used in conjunction with the WM_CHAR message in the ListBox's callback.

Example usage:

case WM_CHAR:
return MaxSDK::SearchListBox( hWnd, (MCHAR)wParam, _M(" "));
CoreExport bool SearchListBox(HWND hWnd, MCHAR key, const MCHAR *szTrim=NULL)
Multiple character search for ListBoxes.
Parameters
[in]hWndWindow handle of ListBox
[in]keyCharacter entered by user
[in]szTrimOptional parameter. Default is NULL. Any leading characters in the ListBox entries that are contained in szTrim will be removed prior to comparing to the search string.
Returns
true if match found, false if not

◆ GetDefaultToolTipMaxWidth()

CoreExport int GetDefaultToolTipMaxWidth ( )
Remarks
Returns the default maximum width, in pixels, for tooltip windows in Max. Tooltips wider than the maximum are broken into multiple lines.