internal vncMouseEventArgs(vncMouseEventType eventType, IntPtr wParam, IntPtr lParam) : base() { m_Type = eventType; m_ButtonMask = 0; m_X = 0; m_Y = 0; // Mouse Position switch (m_Type) { case vncMouseEventType.LeftButtonDown: case vncMouseEventType.LeftButtonUp: case vncMouseEventType.Move: case vncMouseEventType.RightButtonDown: case vncMouseEventType.RightButtonUp: { m_X = NativeMethods.GET_X_LPARAM(lParam); m_Y = NativeMethods.GET_Y_LPARAM(lParam); if((wParam.ToInt32() & NativeMethods.MK_LBUTTON) == NativeMethods.MK_LBUTTON) { m_ButtonMask |= 0x01; } if ((wParam.ToInt32() & NativeMethods.MK_MBUTTON) == NativeMethods.MK_MBUTTON) { m_ButtonMask |= 0x02; } if ((wParam.ToInt32() & NativeMethods.MK_RBUTTON) == NativeMethods.MK_RBUTTON) { m_ButtonMask |= 0x04; } break; } } }
internal vncMouseEventArgs(vncMouseEventType eventType, IntPtr wParam, IntPtr lParam) : base() { m_Type = eventType; m_ButtonMask = 0; m_X = 0; m_Y = 0; // Mouse Position switch (m_Type) { case vncMouseEventType.LeftButtonDown: case vncMouseEventType.LeftButtonUp: case vncMouseEventType.Move: case vncMouseEventType.RightButtonDown: case vncMouseEventType.RightButtonUp: { m_X = NativeMethods.GET_X_LPARAM(lParam); m_Y = NativeMethods.GET_Y_LPARAM(lParam); if ((wParam.ToInt32() & NativeMethods.MK_LBUTTON) == NativeMethods.MK_LBUTTON) { m_ButtonMask |= 0x01; } if ((wParam.ToInt32() & NativeMethods.MK_MBUTTON) == NativeMethods.MK_MBUTTON) { m_ButtonMask |= 0x02; } if ((wParam.ToInt32() & NativeMethods.MK_RBUTTON) == NativeMethods.MK_RBUTTON) { m_ButtonMask |= 0x04; } break; } } }