if I override one of RhinoMouseCallBack functions, like OnMouseDown, how do I use the CRhinoMouseCallback::mouse_button variable to filter only left, or only right click? I don`t quite get it…

(Programming in C++)

P.S. How could I control OnMouseDown and OnMouseMove at the same time? (Dragging)
P.P.S. What is the third - UINT - variable in the function arguments?

See the CRhinoMouseCallback::mouse_button enum type in rhinoSdkMouse.h

For example, to only treat left-button clicks:

BOOL OnMouseDown(CRhinoView& view, CRhinoMouseCallback::mouse_button button, UINT wParam, CPoint point)
   if (button != CRhinoMouseCallback::mouse_button::left_mouse_button) return;
   //do stuff

The third UINT variable maps to the WPARAM parameter in Windows mouse callbacks. See https://msdn.microsoft.com/en-us/library/windows/desktop/gg153548(v=vs.85).aspx

As for dragging, you first get OnMouseDown, the you get OnMouseMove while dragging and finally you get OnMouseUp when the user stops dragging. All three are called, and you can track the dragging state to start on mouse-down and stop on mouse-up. While the mouse-up has not been fired, you should respond to dragging in mouse-move.