Reference » Messages » CursorMoved

CursorMoved (message)

Description

Input event from a screen pointing device (mouse, touchpad, touchpoint, pen, etc).

Details

This message is received by the hot window first (i.e. the hot window is the message's origin - see MWindow::digOrigin). The hot window is the one that contains the primary cursor (see HotChanged for details). That being said, if MApp::screen is the current hot window, then this input event is ignored (not even received by the screen window), unless the cursor is over the app's status icon (see MScreen::StatusIcon).

This message is received every time a cursor's position in hot window's coordinates changes, i.e. when the result of MWindow::getCursorPos called by the hot window changes in any way. This can happen if the cursor is moved on the screen (e.g. by moving the mouse), or if the hot window itself is moved relatively to the cursor (via MWindow::setRect or related function).

The message is also received by the hot window when it becomes hot, even if the cursor's position hasn't changed. This can happen if a hidden or obscured window becomes visible right under the cursor, as the result of a window being resized, moved, created, or closed.

@MWindow::getCursorPos@ is often used during the processing of this message.

Remarks

Example

Let us know

Please Contact us to report any errors on this page, or to suggest any improvements.

Miranor Home | About Miranor | About Elgrint | Create account | Login | Account settings | Contact Us | Privacy Policy | Site map

© Copyright 2014 by Miranor. All rights reserved. By using this site you agree to the Terms of Use.

Page last updated on August 10th, 2014.