The IMousePointerEvent class represents the event used to set the appearance of the mouse pointer as it is moves over a window. This event allows you to query the pointer that the system will show when it is over a window, and allows you to change the pointer to show when it is over a window.
Mouse pointer events are first dispatched to the window that the mouse pointer is positioned on. On OS/2 and Windows, if that window does not process the mouse event, the event is dispatched to its owner window, and continues to be dispatched up the owner window chain until a handler stops the processing or a window processes the mouse pointer event itself.
IMousePointerHandler uses this event class.
An IMousePointerEvent is created from a mouse movement event.
An IMousePointerEvent is created from a WM_CONTROLPOINTER message.
An IMousePointerEvent is created from a WM_SETCURSOR message.
You can construct and destruct objects of this class.
![]() |
public:
virtual ~IMousePointerEvent()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IMousePointerEvent(const IEvent& event)
Constructs an IMousePointerEvent object from the specified event.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The mouse pointer can have different appearances, such as an arrow, a hand, or a clock, to indicate the kind of user interaction a window allows. Use these members to set and query the appearance of the mouse pointer when it is positioned over a window.
![]() |
public:
IPointerHandle defaultMousePointer() const
Returns the mouse pointer that the system would show for the window that is under the mouse if you did not call setMousePointer.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IPointerHandle mousePointer() const
Returns the value passed to setMousePointer.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IMousePointerEvent& setMousePointer( const IPointerHandle& mousePointer )
Sets the appearance of the mouse pointer.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
These members query the position of the mouse pointer. This information allows you to determine what the user is interacting with.
![]() |
public:
IPoint mousePosition() const
Returns the position of the pointer within the window returned by IEvent::dispatchingWindow. The returned point is in application coordinates (see ICoordinateSystem for details).
If you need to obtain the mouse position relative to the desktop window, use the static function IWindow::mapPoint.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to determine the window that is under the mouse.
![]() |
public:
unsigned long windowId() const
Returns the window identifier of the window that is under the mouse pointer.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
virtual ~IEvent()
IWindowHandle controlHandle() const
virtual IWindow* controlWindow() const
IEvent& decrementOwnerLevels()
virtual IWindow* dispatchingWindow() const
unsigned long eventId() const
IWindowHandle handle() const
IEvent(const IEvent& event)
IEvent( IWindow* window, unsigned long eventId, const IEventParameter1& parameter1, const IEventParameter2& parameter2 )
IEvent( const IWindowHandle& handle, unsigned long eventId, const IEventParameter1& parameter1, const IEventParameter2& parameter2 )
IEvent& operator =(const IEvent& event)
IEventParameter1 parameter1() const
IEventParameter2 parameter2() const
bool passToOwner() const
IEventResult result() const
IEvent& setControlHandle(const IWindowHandle& handle)
IEvent& setDispatchingHandle(const IWindowHandle& handle)
IEvent& setDispatchingWindow(IWindow* window)
IEvent& setHandle(const IWindowHandle& handle)
IEvent& setNumberOfLevels(int levels = - 1)
IEvent& setPassToOwner(bool passOn = true)
IEvent& setResult(bool eventResult)
IEvent& setResult(const IEventResult& eventResult)
virtual IWindow* window() const