Reference » Messages » Moved

Moved (message)

Description

Window's position relatively to its parent's top-left corner (including z-order) has changed.

Details

This message is normally generated by MWindow::setRect, MWindow::setPos, MWindow::bringForward, and MWindow::sendBackward functions, right after the RectChanging message (see), if the position has actually changed as the result. If only the size has changed, Resized is generated, but not Moved. Only a change in position relatively to the parent is reported via Moved - if a child window is moved in sync with its parent, it's absolute position on the screen changes, but its relative position does not, and Moved is not reported.

'Moved' can also be received if the window is moved by an external system command or internally by Elgrint (e.g. during window animation - see MWindow::setRect). In these cases, Moved is not preceded by RectChanging message. The externally-generated moving usually occurs only in MMainFrame. A mainframe can be moved externally via the Task Manager's "Cascade" or "Tile" commands, or via the Taskbar button's menu.

If the window's content depends on its position, i.e. OnPaint calls MWindow::getRect or MWindow::getPos, then OnMoved needs to call MWindow::repaint for visual consistency (see Remarks).

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.