This method returns the mouse position and general mouse information.
HRESULT GetMouseInfo(
[out] VARIANT* longFlags,
[out] VARIANT* longScreenX,
[out] VARIANT* longScreenY)
Parameters:
longFlags – Indicates whether various virtual keys are down. This parameter can be any combination of the following values:
MK_ LBUTTON = 1
MK_ RBUTTON = 2
MK_ SHIFT = 4
MK_CONTROL = 8
MK_ MBUTTON = 16
longScreenX – The x-coordinate of the mouse. The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window.
longScreenY – The y-coordinate of the mouse. The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window.
Return Values:
The return value obtained from the returned HRESULT can be one of the following:
Return value |
Meaning |
S_OK |
Success. |
E_FAIL |
Catastrophic failure. |
TE_E_MPTNOTLOADED |
An MPT file must be loaded in TerraExplorer for this method to work. |