Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IDirect3DDevice9::ShowCursor method

Displays or hides the cursor.

Syntax


BOOL ShowCursor(
  [in]  BOOL bShow
);

Parameters

bShow [in]

Type: BOOL

If bShow is TRUE, the cursor is shown. If bShow is FALSE, the cursor is hidden.

Return value

Type: BOOL

Value indicating whether the cursor was previously visible. TRUE if the cursor was previously visible, or FALSE if the cursor was not previously visible.

Remarks

Direct3D cursor functions use either GDI cursor or software emulation, depending on the hardware. Users usually want to respond to a WM_SETCURSOR message. For example, the users might want to write the message handler like this:



    
case WM_SETCURSOR:

// Turn off window cursor 
    
SetCursor( NULL );
    
m_pd3dDevice->ShowCursor( TRUE );
    
return TRUE; // prevent Windows from setting cursor to window class cursor
    
break;


Or users might want to call the IDirect3DDevice9::SetCursorProperties method if they want to change the cursor. See the code in the DirectX Graphics C/C++ Samples for more detail.

Requirements

Header

D3D9.h

Library

D3D9.lib

See also

IDirect3DDevice9
IDirect3DDevice9::SetCursorPosition
IDirect3DDevice9::SetCursorProperties

 

 

Community Additions

Show:
© 2014 Microsoft