OnMouseMove

CNi

Function Group
OnMouseMove() Functions    Prev page: OnMouseDownNext page: OnMouseUp    
Function Declared in:
NiKnobEvents.h

'Declaration' icon -- Shortcut to top of page. Declaration

void OnMouseMove(
    short Button,
    short Shift,
    long x,
    long y);

'Description' icon -- Shortcut to top of page. Description

Generated when you move the mouse over the control.

Shortcut to top of page. Parameters

short Button

Contains the state of the mouse buttons, which can be any combination of the CNiKnob::MouseButton enumeration values. The list below includes valid enumeration values.

  • CNiKnob::LeftButton - the user pressed the left mouse button.
  • CNiKnob::RightButton - the user pressed the right mouse button.
  • CNiKnob::MiddleButton - the user pressed the middle mouse button.
short Shift

Contains the state of the SHIFT, CTRL, and ALT keys, which can be any combination of the CNiKnob::ShiftKeys enumeration values. The list below includes valid enumeration values.

  • CNiKnob::ShiftKey - the user pressed the SHIFT key.
  • CNiKnob::CtrlKey - the user pressed the CTRL key.
  • CNiKnob::AltKey - the user pressed the ALT key.
long x

The x position of the mouse when the event occurred.

long y

The y position of the mouse when the event occurred.

'See Also' icon -- Shortcut to top of page. See Also

Shortcut to top of page. Example

void OnMouseMove(short Button, short Shift, long x, long y) {
   if ((X > 20 && Y < 100) && (Shift == CNiKnob::ShiftKey | CNiKnob::AltKey)) {
       // Your event code here.
   }
}