Gets the x-coordinate (in pixels) of the mouse pointer, or user's finger, offset from the closest relatively positioned parent element of the element that fired the event.
HRESULT IHTMLEventObj::get_x(long *p);
- Pointer to a variable of type long that receives the x-coordinate, in pixels.
Returns S_OK if successful, or an error value otherwise.
If the event firing element is relatively positioned, then the x-coordinate from the boundary of the element is returned. If the event firing element and all of its parent elements are not relatively positioned, then the IHTMLEventObj::x property returns a coordinate relative to the body element.
If the mouse or finger is outside the window when the event is called, this property returns