Class ParamMap2UserDlgProc

3DS Max Plug-In SDK

Class ParamMap2UserDlgProc

See Also: Class ParamBlockDesc2, Class ClassDesc2.

class ParamMap2UserDlgProc

Description:

This class is available in release 3.0 and later only.

This class is used with the release 3 parameter map system. If there are controls which require custom handling you can create an object from this class and set it as the parameter map's user callback (usually using SetUserDialogProc()).

Methods:

public:

Prototype:

virtual BOOL DlgProc(TimeValue t, IParamMap2 *map, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)=0;

Remarks:

Implemented by the Plug-In.

This is the dialog proc that will be called to process the control messages. This proc will be called after the default processing is complete.

Parameters:

TimeValue t

This is the current time.

IParamMap2 *map

This is a pointer to the parameter map.

HWND hWnd

This is the handle to the dialog.

UINT msg

This is the message that should be processed by the dialog proc.

WPARAM wParam

This is a parameter that holds message specific information.

LPARAM lParam

This is a parameter that holds message specific information.

Return Value:

This is essentially the equivalent of a normal Windows dialog proc, so it should return whatever value a normal dialog proc returns for the message. An exception is that the value REDRAW_VIEWS may be returned to cause the viewports to be redrawn.

Prototype:

virtual void DeleteThis()=0;

Remarks:

Implemented by the Plug-In.

This method is called to delete this object. If the DlgProc is non-NULL when the ParamMap is deleted this method will be called.

Prototype:

virtual void SetThing(ReferenceTarget *m);

Remarks:

Implemented by the Plug-In.

This gets called if the DlgProc is registered with a parameter map associated with one of the IAutoXXXParamDlg instances and that dialog has SetThing() called on it. This provides a simple way for the user dialog proc to track changes to the underlying object in the parameter map.

Parameters:

ReferenceTarget *m

The item that was set.

Default Implementation:

{}

Prototype:

virtual void Update(TimeValue t, Interval& valid, IParamMap2* pmap);

Remarks:

This method is available in release 4.0 and later only.

This is a variant of Update() method in ParamMap2UserDlgProc used to supply more context, including the pmap itself and its validity interval. Changes you make to the validity internal passed in affect the validity interval of the whole parammap.

Parameters:

TimeValue t

The time at which the update is taking place.

Interval& valid

The validity interval of the parameter map.

IParamMap2 *pmap

The parameter map the user dialog proc is associated with.