Export (0) Print
Expand All
Expand Minimize

IDirect3DDevice9::SetCursorPosition method

Sets the cursor position and update options.

Syntax


void SetCursorPosition(
  [in]  INT X,
  [in]  INT Y,
  [in]  DWORD Flags
);

Parameters

X [in]

Type: INT

The new X-position of the cursor in virtual desktop coordinates. See Remarks.

Y [in]

Type: INT

The new Y-position of the cursor in virtual desktop coordinates. See Remarks.

Flags [in]

Type: DWORD

Specifies the update options for the cursor. Currently, only one flag is defined.

ValueMeaning
D3DCURSOR_IMMEDIATE_UPDATE

Update cursor at the refresh rate.

If this flag is specified, the system guarantees that the cursor will be updated at a minimum of half the display refresh rate, but never more frequently than the display refresh rate. Otherwise, the method delays cursor updates until the next IDirect3DDevice9::Present call. Not setting this flag usually results in better performance than if the flag is set. However, applications should set this flag if the rate of calls to Present is low enough that users would notice a significant delay in cursor motion. This flag has no effect in a windowed-mode application. Some video cards implement hardware color cursors. This flag does not have an effect on these cards.

 

Return value

None.

Remarks

When running in full-screen mode, screen space coordinates are the back buffer coordinates appropriately scaled to the current display mode. When running in windowed mode, screen space coordinates are the desktop coordinates. The cursor image is drawn at the specified position minus the hotspot-offset specified by the SetCursorProperties method.

If the cursor has been hidden by ShowCursor, the cursor is not drawn.

Requirements

Header

D3D9.h

Library

D3D9.lib

See also

IDirect3DDevice9
SetCursorProperties
ShowCursor

 

 

Community Additions

ADD
Show:
© 2014 Microsoft