3ds Max C++ API Reference
|
Namespaces | |
AssetManagement | |
ChannelData | |
These are classes and enums to support the Data Channel Modifier. | |
CUI | |
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. | |
DebuggingTools | |
GeomBind | |
These classes let you define skin weighting using a voxel or height map based algorithm. | |
Graphics | |
NotificationAPI | |
NotificationAPIUtils | |
This namespace exposes 4 private internal calls to the 3dsmax application. | |
OSL | |
ParticleFlow | |
PerformanceTools | |
PointCloud | |
Populate | |
RenderingAPI | |
RenderTimeInstancing | |
This API is meant to be implemented by plugins and used by renderers to instantiate objects at render-time. | |
SkinEngine | |
ThreadingDebuggingTools | |
The functions in this namespace are provided to assist in debugging operations performed on a worker thread. | |
TranslationSupport | |
MAXScript scripts are typically written in English, but when MAXScript accesses names from TrackView nodes only localized names are available. | |
Util | |
Classes | |
struct | AutoPtrRef |
Helper class used to implement destructive copy semantics and allow for AutoPtrs to be used as return values. More... | |
class | SinglePointerDestructor |
DestructorPolicy template for pointer to single object types. More... | |
class | AutoPtr |
Automatic memory-ownership pointer supporting "resource acquisition is initialization. More... | |
class | ArrayPointerDestructor |
DestructorPolicy template for pointer to array types. More... | |
class | ArrayAutoPtr |
Standard implementation of a AutoPtr for pointer to array types. More... | |
class | DeleteThisDestructor |
DestructorPolicy template for types requiring destruction through DeleteThis. More... | |
class | DeleteThisAutoPtr |
Partial template specialization of AutoPtr for types requiring destruction through a DeleteThis method. More... | |
class | Array |
A generic array container, with proper support for non-POD types. More... | |
class | IPhysicalSunSky |
Access to functionality and properties of the Physical Sun & Sky environment map. More... | |
class | ISunPositioner |
Access to functionality and properties of the Sun Positioner object. More... | |
class | EdgeDescr |
class | PointToPointPath |
class | BufferProxy |
class | VertexNormal |
The class used to compute vertex normals considering smoothing. More... | |
class | IHelpSystem |
This interface provides access to the 3ds Max Help system. More... | |
class | HoldBegin |
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 | ISceneScriptSecurityManager |
Interface class for the Scene Script Security Manager. More... | |
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 | QmaxProxyDockingWinHostDelegate |
class | QmaxDockWidget |
class | QmaxFloatSlider |
Qt Max slider for float values. 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 | QmaxMultiSpinner |
class | QmaxPoint2Spinner |
class | QmaxPoint3Spinner |
class | QmaxPoint4Spinner |
class | QmaxMatrix3Spinner |
class | QMaxParamBlockWidget |
Base class for QWidgets which are to be controlled by a parameter block/map. More... | |
class | QmaxRollup |
3ds Max Qt Rollup class. More... | |
class | QmaxRollupContainer |
class | QmaxSpinBoxPrivate |
class | QmaxDoubleSpinBox |
3ds Max's version of a Qt QDoubleSpinBox. More... | |
class | QmaxWorldSpinBox |
A special QmaxDoubleSpinBox that displays its value using the current display units like cm or inches. More... | |
class | QmaxLightingSpinBox |
A special QmaxDoubleSpinBox that displays its value using the current lighting units. More... | |
class | QmaxSpinBox |
3ds Max's version of a Qt QSpinBox. More... | |
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 | 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 | INoSignalCheckProgress |
An alternative progress reporting interface to class RendProgressCallback, which does not process the window message queue. More... | |
class | IHairModifier |
Provides access to hair strand definitions for a modifier that generates hair. More... | |
class | IPhysicalCamera |
Access to the properties of the Physical Camera object. More... | |
class | IPhysicalCameraToneOperator |
Access to the properties of the Physical Camera Exposure Control. More... | |
class | IPhysicalCamera_BitmapApertureSampler |
Utility class that provides efficient sampling for a bitmap aperture on the physical camera. More... | |
class | SharedMesh |
SharedMesh is a class to share a mesh between different classes. More... | |
class | SingleWeakRefMaker |
Utility base class for a ReferenceMaker with a single target that does not share ownership of it's ReferenceTarget. More... | |
class | TypedSingleWeakRefMaker |
class | TexmapThreadSafe |
TexmapThreadSafe interface has been deprecated. More... | |
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< SharedMesh > | SharedMeshPtr |
About SharedMeshPtr defined below : This template class act similar to CComPtr. More... | |
Functions | |
HINSTANCE | GetHInstance () |
Get the calling module's HINSTANCE. More... | |
MSTR | GetResourceStringAsMSTR (UINT resourceId) |
Extract a resource from the calling module's string table. More... | |
bool | GetResourceStringAsMSTR (UINT resourceId, MSTR &resourceString) |
Extract a resource from the calling module's string table. More... | |
void | SortPolygonDiagonals (geo::span< int > diag) |
Puts diagonals in increase-by-last-index, decrease-by-first order. More... | |
void | SortPolygonDiagonals (geo::span< uint64_t > diag) |
void | BestConvexDiagonals (const BufferProxy< const int > &faceVertexIndices, const BufferProxy< const Point3 > &meshVertices, int *diag) |
Uses a triangulation scheme optimized for convex polygons to find a set of diagonals for this sequence of vertices, creating a triangulation for the polygon they form. More... | |
void | BestConvexDiagonals (const BufferProxy< const int > &faceVertexIndices, const BufferProxy< const DPoint3 > &meshVertices, int *diag) |
Uses a triangulation scheme optimized for convex polygons to find a set of diagonals for this sequence of vertices, creating a triangulation for the polygon they form. More... | |
void | FindDiagonals (const BufferProxy< const int > &faceVertexIndices, const BufferProxy< const Point3 > &meshVertices, int *diag) |
This method finds diagonals for this sequence of vertices, creating a triangulation for the polygon they form. More... | |
void | FindDiagonals (const BufferProxy< const int > &faceVertexIndices, const BufferProxy< const DPoint3 > &meshVertices, int *diag) |
This method finds diagonals for this sequence of vertices, creating a triangulation for the polygon they form. More... | |
void | GetTriangles (int deg, geo::span< int > diag, geo::span< int > out_tri) |
This method fills in the buffer with the full triangulation for the face, based on the internal diagonal list. More... | |
void | GetTriangles (uint16_t deg, geo::span< uint16_t > diag, geo::span< uint16_t > out_tri) |
void | GetTriangles (uint64_t deg, geo::span< uint64_t > diag, geo::span< uint64_t > out_tri) |
UtilExport MSTR | GetResourceStringAsMSTR (HINSTANCE hinstance, UINT resourceId) |
Extract a resource from a module's string table. More... | |
UtilExport bool | GetResourceStringAsMSTR (HINSTANCE hinstance, UINT resourceId, MSTR &resourceString) |
Extract a resource from a module's string table. 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... | |
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. More... | |
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) |
UtilExport float | GetUIScaleFactor (int monitorID=-1) |
Returns the UI scaling factor relative to a default of 96 DPI. More... | |
UtilExport float | GetUIUserScaleFactor () |
Get the additional user UI scaling factor. More... | |
int | UIScaled (int value, int monitorID=-1) |
Returns the given value multiplied with the UI scaling factor. More... | |
float | UIScaled (float value, int monitorID=-1) |
Returns the given value multiplied with the UI scaling factor. More... | |
int | UIUnScaled (int value, int monitorID=-1) |
Returns the given value divided with the UI scaling factor. More... | |
float | UIUnScaled (float value, int monitorID=-1) |
Returns the given value divided with the UI scaling factor. More... | |
void | ScaleRect (RECT &rect, int monitorID=-1) |
Scaling of a rectangle values based on UIScaleFactor. More... | |
void | UnscaleRect (RECT &rect, int monitorID=-1) |
Unscaling of a rectangle values based on UIScaleFactor. More... | |
UtilExport HBITMAP | GetUIScaledBitmap (HBITMAP bitmap, int monitorID=-1) |
Returns a scaled copy of the bitmap if the UI scaling factor is not 1.0. More... | |
UtilExport HRESULT | AnnotateControlName (HWND hWnd, const MSTR &name) |
Annotates the control with Microsoft Active Accessibility name property. More... | |
UtilExport HRESULT | RemoveAnnotatedNameFromControl (HWND hWnd) |
Removes the Microsoft Active Accessibility name from the control. More... | |
CoreExport void | ScaleFileOpenSaveDialogToolbar (HWND hDlg) |
Scales the toolbar size and icons in standard file open/save dialogs. More... | |
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. More... | |
UtilExport int | MaxMessageBox (HWND parent, LPCMSTR text, LPCMSTR 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. More... | |
CoreExport bool | SearchComboBox (HWND hWnd, MCHAR key, const MCHAR *szTrim=NULL) |
Multiple character search for ComboBoxes. More... | |
CoreExport bool | SearchListBox (HWND hWnd, MCHAR key, const MCHAR *szTrim=NULL) |
Multiple character search for ListBoxes. More... | |
CoreExport int | GetDefaultToolTipMaxWidth () |
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.
|
inline |
Get the calling module's HINSTANCE.
|
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.
resourceId | Identifier for the desired string resource within the calling module's string table. |
|
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.
resourceId | Identifier for the desired string resource within the calling module's string table. |
resourceString | Updated to contain the resource string if the requested resource is not found. |
Puts diagonals in increase-by-last-index, decrease-by-first order.
This sorts the diagonals in the following fashion: each diagonal is reordered so that its smaller index comes first, then its larger. Then the list of diagonals is sorted so that it increases by second index, then decreases by first index. Such an ordered list for a 9-gon might be (1,3),(0,3), (0,4),(5,7),(4,7),(4,8). (This order is especially convenient for converting into triangles - it makes for a linear-time conversion.) SortPolygonDiagonals() uses qsort for speed.
[in,out] | diag | The diagonals. |
void MaxSDK::SortPolygonDiagonals | ( | geo::span< uint64_t > | diag | ) |
void MaxSDK::BestConvexDiagonals | ( | const BufferProxy< const int > & | faceVertexIndices, |
const BufferProxy< const Point3 > & | meshVertices, | ||
int * | diag | ||
) |
Uses a triangulation scheme optimized for convex polygons to find a set of diagonals for this sequence of vertices, creating a triangulation for the polygon they form.
Face vertices are optional. If there is no index buffer, we assume they are trivial: 0, 1, 2, 3, 4, etc.
[in] | faceVertexIndices | The face vertices in the sequence. |
[in] | meshVertices | The array of vertices. |
[out] | diag | A pointer to an array of size (deg-3)*2 where the diagonals can be put. |
void MaxSDK::BestConvexDiagonals | ( | const BufferProxy< const int > & | faceVertexIndices, |
const BufferProxy< const DPoint3 > & | meshVertices, | ||
int * | diag | ||
) |
Uses a triangulation scheme optimized for convex polygons to find a set of diagonals for this sequence of vertices, creating a triangulation for the polygon they form.
Face vertices are optional. If there is no index buffer, we assume they are trivial: 0, 1, 2, 3, 4, etc.
[in] | faceVertexIndices | The face vertices in the sequence. |
[in] | meshVertices | The array of vertices. |
[out] | diag | A pointer to an array of size (deg-3)*2 where the diagonals can be put. |
void MaxSDK::FindDiagonals | ( | const BufferProxy< const int > & | faceVertexIndices, |
const BufferProxy< const Point3 > & | meshVertices, | ||
int * | diag | ||
) |
This method finds diagonals for this sequence of vertices, creating a triangulation for the polygon they form.
[in] | faceVertexIndices | The face vertices in the sequence. |
[in] | meshVertices | The array of vertices. |
[out] | diag | A pointer to an array of size (deg-3)*2 where the diagonals can be put. |
void MaxSDK::FindDiagonals | ( | const BufferProxy< const int > & | faceVertexIndices, |
const BufferProxy< const DPoint3 > & | meshVertices, | ||
int * | diag | ||
) |
This method finds diagonals for this sequence of vertices, creating a triangulation for the polygon they form.
[in] | faceVertexIndices | The face vertices in the sequence. |
[in] | meshVertices | The array of vertices. |
[out] | diag | A pointer to an array of size (deg-3)*2 where the diagonals can be put. |
This method fills in the buffer with the full triangulation for the face, based on the internal diagonal list.
The buffer must be of size (deg-2)*3.
[in] | deg | Face degree (number of vertices). |
[in,out] | diag | The diagonals. |
[out] | out_tri | The output triangle indices, 3 indices per triangle. |
The buffer must be of size (deg-2)*3. Diags are not reordered.
[in] | deg | Face degree (number of vertices). |
[in] | diag | The diagonals. |
[out] | out_tri | The output triangle indices, 3 indices per triangle. |
void GetTriangles | ( | uint16_t | deg, |
geo::span< uint16_t > | diag, | ||
geo::span< uint16_t > | out_tri | ||
) |
void GetTriangles | ( | uint64_t | deg, |
geo::span< uint64_t > | diag, | ||
geo::span< uint64_t > | out_tri | ||
) |
UtilExport MSTR MaxSDK::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.
hinstance | Handle to the module whose string table will be queried for the resource. |
resourceId | Identifier for the desired string resource within the calling module's string table. |
UtilExport bool MaxSDK::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.
hinstance | Handle to the module whose string table will be queried for the resource. |
resourceId | Identifier for the desired string resource within the calling module's string table. |
resourceString | Updated to contain the resource string if the requested resource is not found. |
CoreExport QIcon MaxSDK::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:
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.
[in] | iconName | The 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. |
CoreExport HICON MaxSDK::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.
[in] | iconName | The 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] | width | The (maximum) width of the image to be loaded. |
[in] | height | The (maximum) height of the image to be loaded. |
[in] | enabled | Sets, if an enabled or disabled version of the icon should be retrieved (QIcon::Normal vs QIcon::Disabled) |
[in] | on | Sets, if the On or Off state of the icon should be retrieved (QIcon::On vs QIcon::Off). |
|
inline |
CoreExport HIMAGELIST MaxSDK::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.
[in] | imageIconName | The 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] | size | The width and height of the component icons in the image to be loaded. |
[in] | count | The number of component icons in the image to be loaded. |
[in] | alpha | Sets, if alpha channel in icon should be used when creating the bitmap from the QIcon |
[in] | enabled | Sets, if an enabled or disabled version of the icon should be retrieved (QIcon::Normal vs QIcon::Disabled) |
[in] | on | Sets, if the On or Off state of the icon should be retrieved (QIcon::On vs QIcon::Off). |
UtilExport int MaxSDK::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%.
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:
|
exType | - Used for adding additional UI elements. The supported bit field values are:
|
exRet | - Used for specifying the help file topic id and for returning extra info:
|
MaxSDK::Q_DECLARE_METATYPE | ( | AColor | ) |
MaxSDK::Q_DECLARE_METATYPE | ( | Point2 | ) |
MaxSDK::Q_DECLARE_METATYPE | ( | Point3 | ) |
MaxSDK::Q_DECLARE_METATYPE | ( | Point4 | ) |
MaxSDK::Q_DECLARE_METATYPE | ( | Matrix3 | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
UtilExport float MaxSDK::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.
[in] | monitorID | The index of the monitor to get the actual logical vertical DPI from. Default value is set to -1, which means the primary system monitor. |
UtilExport float MaxSDK::GetUIUserScaleFactor | ( | ) |
Get the additional user UI scaling factor.
Returns the given value multiplied with the UI scaling factor.
[in] | value | The value which should be dpi scaled. |
[in] | monitorID | The index of the monitor to get the actual logical vertical dpi from. Default value is set to -1, which means the primary system monitor. |
|
inline |
Returns the given value multiplied with the UI scaling factor.
[in] | value | The value which should be dpi scaled. |
[in] | monitorID | The 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 given value divided with the UI scaling factor.
Use this function to do an unscaling of a previous dpi scaled value.
[in] | value | The value which should be dpi unscaled. |
[in] | monitorID | The index of the monitor to get the actual logical vertical dpi from. Default value is set to -1, which means the primary system monitor. |
|
inline |
Returns the given value divided with the UI scaling factor.
Use this function to do an unscaling of a previous dpi scaled value.
[in] | value | The value which should be dpi unscaled. |
[in] | monitorID | The index of the monitor to get the actual logical vertical dpi from. Default value is set to -1, which means the primary system monitor. |
Scaling of a rectangle values based on UIScaleFactor.
[in,out] | rect | RECT struct to be scaled to UIScaleFactor |
[in] | monitorID | The index of the monitor to get the actual logical vertical dpi from. Default value is set to -1, which means the primary system monitor. |
Unscaling of a rectangle values based on UIScaleFactor.
[in,out] | rect | RECT struct to be unscaled to UIScaleFactor |
[in] | monitorID | The index of the monitor to get the actual logical vertical dpi from. Default value is set to -1, which means the primary system monitor. |
UtilExport HBITMAP MaxSDK::GetUIScaledBitmap | ( | HBITMAP | bitmap, |
int | monitorID = -1 |
||
) |
Returns a scaled copy of the bitmap if the UI scaling factor is not 1.0.
[in] | bitmap | The bitmap to be dpi scaled. |
[in] | monitorID | The index of the monitor to get the actual logical vertical dpi from. Default value is set to -1, which means the primary system monitor. |
UtilExport HRESULT MaxSDK::AnnotateControlName | ( | HWND | hWnd, |
const MSTR & | name | ||
) |
Annotates the control with Microsoft Active Accessibility name property.
[in] | hWnd | The window handle of the control to be annotated |
[in] | name | The name annotated to the control |
UtilExport HRESULT MaxSDK::RemoveAnnotatedNameFromControl | ( | HWND | hWnd | ) |
Removes the Microsoft Active Accessibility name from the control.
[in] | hWnd | The window handle of the control to be removed annotation |
CoreExport void MaxSDK::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
[in] | hDlg | The dialog's HWND. |
CoreExport INT_PTR WINAPI MaxSDK::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 not customization of the Open/Save File dialog is being performed.
Example usage:
Implementation:
UtilExport int MaxSDK::MaxMessageBox | ( | HWND | parent, |
LPCMSTR | text, | ||
LPCMSTR | 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%.
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:
|
exType | - Used for adding additional UI elements. The supported bit field values are:
|
exRet | - Used for specifying the help file topic id and for returning extra info:
|
CoreExport bool MaxSDK::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:
[in] | hWnd | Window handle of ComboBox |
[in] | key | Character entered by user |
[in] | szTrim | Optional 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. |
CoreExport bool MaxSDK::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:
[in] | hWnd | Window handle of ListBox |
[in] | key | Character entered by user |
[in] | szTrim | Optional 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. |
CoreExport int MaxSDK::GetDefaultToolTipMaxWidth | ( | ) |