Namespaces | Classes | Functions

MaxSDK Namespace Reference

Namespaces

namespace   AssetManagement
namespace   Util
namespace   DebuggingTools
namespace   PerformanceTools
namespace   Graphics

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   IHelpSystem
  This interface provides access to the 3ds Max Help system. More...
class   SingleWeakRefMaker
  Utility base class for a ReferenceMaker with a single target that does not share ownership of it's ReferenceTarget. 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...
class   Array
  A generic array container, with proper support for non-POD types. More...

Functions

HINSTANCE  GetHInstance ()
  Get the calling module's HINSTANCE.
const MCHAR *  GetResourceString (UINT resourceId)
  Extract a resource from the calling module's string table.
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 const MCHAR *  GetResourceString (HINSTANCE hinstance, UINT resourceId)
  Extract a resource from a 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 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 ()

Function Documentation

HINSTANCE MaxSDK::GetHInstance ( ) [inline]

Get the calling module's HINSTANCE.

Returns:
Handle pointing to the start of the calling module.
{
    return reinterpret_cast<HINSTANCE>(&__ImageBase);
}
const MCHAR* MaxSDK::GetResourceString ( UINT  resourceId ) [inline]

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

GetResourceString is essentially a 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.

Note that this uses a static buffer internally, and is therefore not thread- safe. Furthermore, if a client needs multiple resource strings simultaneously, it must copy GetResourceString's result locally before making a subsequent call.

Parameters:
resourceId Identifier for the desired string resource within the calling module's string table.
Returns:
Pointer to a null-terminated character string, or null if the requested resource is not found.
{
    return MaxSDK::GetResourceString(GetHInstance(), resourceId);
}
MSTR MaxSDK::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:
resourceId Identifier 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.
{
    return MaxSDK::GetResourceStringAsMSTR(GetHInstance(), resourceId);
}
bool MaxSDK::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:
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.
Returns:
true if the requested resource is found, false if not
{
    return MaxSDK::GetResourceStringAsMSTR(GetHInstance(), resourceId, resourceString);

}
UtilExport const MCHAR* MaxSDK::GetResourceString ( HINSTANCE  hinstance,
UINT  resourceId 
)

Extract a resource from a module's string table.

GetResourceString is essentially a 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.

Note that this uses a static buffer internally, and is therefore not thread- safe. Furthermore, if a client needs multiple resource strings simultaneously, it must copy GetResourceString's result locally before making a subsequent call.

Parameters:
hinstance Handle to the module whose string table will be queried for the resource.
resourceId Identifier for the desired string resource within the given module's string table.
Returns:
Pointer to a null-terminated character string, or null if the requested resource is not found.
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.

Parameters:
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.
Returns:
An MSTR containing the resource string, empty if the requested resource is not found.
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.

Parameters:
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.
Returns:
true if the requested resource is found, false if not
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:

    case WM_CHAR:
        return MaxSDK::SearchComboBox( hWnd, (MCHAR)wParam, _M(" "));
Parameters:
[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.
Returns:
true if match found, false if not
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:

    case WM_CHAR:
        return MaxSDK::SearchListBox( hWnd, (MCHAR)wParam, _M(" "));
Parameters:
[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.
Returns:
true if match found, false if not
CoreExport int MaxSDK::GetDefaultToolTipMaxWidth ( )
Remarks:
Returns the default maximum width, in pixels, for tooltip windows in Max. Tooltips wider than the maximum are broken into multiple lines.