Class IDADWindow

3DS Max Plug-In SDK

Class IDADWindow

See Also: Class ICustomControl, Class DADMgr, Custom Controls.

class IDADWindow : public ICustomControl

Description:

This class is available in release 2.0 and later only.

This is a new type of custom control used to provide drag and drop to and from things other than Custom Buttons. An example of an item that uses this control is a sample sphere window in the Material Editor.

To initialize the pointer to the control call:

Prototype:

IDADWindow *GetIDADWindow(HWND hWnd);

To release the control call:

Prototype:

void ReleaseIDADWindow(IDADWindow *idw);

The value to use in the Class field of the Custom Control Properties dialog is: DragDropWindow

All methods of this class are implemented by the system.

Methods:

Prototype:

virtual void SetDADMgr(DADMgr *dadMgr)=0;

Remarks:

Set the drag and drop manager for this control.

Parameters:

DADMgr *dadMgr

A pointer to the drag and drop manager for this control.

Prototype:

virtual DADMgr *GetDADMgr()=0;

Remarks:

Returns a pointer to the drag and drop manager for this control.

Prototype:

virtual void SetWindowProc(WindowProc *proc)=0;

Remarks:

This method establishes a window proc that is called to handle all the normal processing after the drag and drop processing is done.

Parameters:

WindowProc *proc

The window proc. Note the following typedef:

typedef LRESULT CALLBACK WindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);

 

#define SLIDERWINDOWCLASS _T("SliderControl")

 

// LOWORD(wParam) = ctrlID,

// HIWORD(wParam) = TRUE if user is dragging the slider interactively.

// lParam = pointer to ISliderControl

#define CC_SLIDER_CHANGE   WM_USER + 611

 

// LOWORD(wParam) = ctrlID,

// lParam = pointer to ISliderControl

#define CC_SLIDER_BUTTONDOWN WM_USER + 612

 

// LOWORD(wParam) = ctrlID,

// HIWORD(wParam) = FALSE if user cancelled - TRUE otherwise

// lParam = pointer to ISliderControl

#define CC_SLIDER_BUTTONUP  WM_USER + 613