Class RightClickMenu

3DS Max Plug-In SDK

Class RightClickMenu

See Also: Class RightClickMenuManager, Class Interface, Class IPoint2.

class RightClickMenu

Description:

This class provides methods to work with the right click menu that pops up when the user right clicks over an item in a viewport. Methods of this class are used to initialize the menu and process the users selections. A developer derives a class from this class. For sample code see \MAXSDK\SAMPLES\MODIFIERS\EDITPATCH\EDITPAT.CPP. Also see the method Interface::GetRightClickMenuManager().

Methods:

Prototype:

virtual void Init(RightClickMenuManager* manager, HWND hWnd, IPoint2 m)=0;

Remarks:

Implemented by the Plug-In.

This method is called when the user right clicks on an object in the scene. At this point you can determine what you need in the menu, and add these items using manager->AddMenu().

Parameters:

RightClickMenuManager* manager

The menu manager. You may use this pointer to call methods of this class (for example to add items to the menu).

HWND hWnd

The window handle the user right clicked in.

IPoint2 m

The screen point the user right clicked on.

Prototype:

virtual void Selected(UINT id)=0;

Remarks:

Implemented by the Plug-In.

This method is called when the user has selected an item from the menu.

Parameters:

UINT id

This is the id of the users selection. This id is established when the developer calls RightClickMenuManager::AddMenu().