Determining a mouse event's position

All mouse events have positional information associated with them. You can access this information using the MMouseEventHandler::GetEventPosition method. The position returned by this method is the position of the mouse pointer at the time the event was generated.

NOTE You can design your application to use either an absolute or a relative coordinate system. Event coordinates in the coordinate system of the View which mixes in MMouseEventHandler are relative. Coordinates in the coordinate system of the display device are global.

Getting global or relative coordinates

If you want to receive relative coordinates, you must pass the MMouseEventHandler::GetEventPosition method a valid TViewHandle. If you want to get global coordinates, you should pass a valid TViewHandle to MMouseEventHandler::GlobalEventPosition.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker