MouseCallBack - how to get mouse up message ?

MouseCallBack - how to get mouse up message ?

tagopinath
Enthusiast Enthusiast
846 Views
4 Replies
Message 1 of 5

MouseCallBack - how to get mouse up message ?

tagopinath
Enthusiast
Enthusiast

Hello,

 

I am trying to draw something on an object in viewport, for that, i am making a subclass of MouseCallBack and in the proc() i am using MOUSE_POINT, MOUSE_FREEMOVE and MOUSE_MOVE cases for drawing purpose.

 

The functionality which is added in MOUSE_POINT and MOUSE_FREEMOVE works fine, means, i click at any place on object, with mouse clicked, i drag and drawing happens on mouse position. But, when i release mouse, and move, drawing is still happening. I am trying to add a flag on mouse up, but i didn't know where to add. 

 

I am not modifying override function.

 

Also, when i change MOUSE_FREEMOVE to MOUSE_MOVE, then drawing not happens on mouse drag.

 

Please suggest any ideas.

 

Regards,

Gopi.

0 Likes
Accepted solutions (1)
847 Views
4 Replies
Replies (4)
Message 2 of 5

denisT.MaxDoctor
Advisor
Advisor

The only way I know how to extend the functionality of mouseTrack() is to do it yourself by writing your own TrackMouseCallBack using the MAX SDK. The SDK samples have a complete example: ...maxsdk/samples/maxscript/mxsagni/moustrak.cpp

0 Likes
Message 3 of 5

istan
Advisor
Advisor

As he wrote about proc(), I assume he is already talking about C++.  I would search for "MOUSE_LBUTTON" in the SDK samples.

 

0 Likes
Message 4 of 5

istan
Advisor
Advisor
Accepted solution

As he wrote about proc(), I assume he is already talking about C++.  I would search for "MOUSE_LBUTTON" in the SDK samples.

0 Likes
Message 5 of 5

tagopinath
Enthusiast
Enthusiast

Thank you Denis and Istan for your replies.

 

I am getting some idea after looking into MOUSE_LBUTTON option. Will try on that.

 

Regards,

Gopinath.

0 Likes