IonicWind Software

IWBasic => Games and Graphics => Topic started by: carpman2007 on March 19, 2009, 10:47:31 PM

Title: Turn off the mouse pointer in DirectX?
Post by: carpman2007 on March 19, 2009, 10:47:31 PM
Hello all,

Forgive me if this question has been asked already -- I looked around but couldn't find an answer.

How does one, from within an EB program, hide the mouse pointer in full-screen DirectX mode?
Title: Re: Turn off the mouse pointer in DirectX?
Post by: Ionic Wind Support Team on March 19, 2009, 10:53:22 PM
For 2D or 3D?

For 2D programs:

SETCURSOR FrontBuffer,@CSCUSTOM,0

Will do it and

SETCURSOR FrontBuffer,@CSARROW

Brings it back. 

For 3D programs the commands are the same, just substitute your window variable name for FrontBuffer.

Paul.
Title: Re: Turn off the mouse pointer in DirectX?
Post by: ZeroDog on March 19, 2009, 11:33:31 PM
can't you use the frontbuffer in a fullscreen d3d screen as well?
Title: Re: Turn off the mouse pointer in DirectX?
Post by: Ionic Wind Support Team on March 19, 2009, 11:54:44 PM
FrontBuffer/BackBuffer are reserved variable name only used for 2D screens (DX7).   I was actually wrong about the 3D screen method, was thinking about the old 3D engine we used to have,

For a 3D screen use the m_win member variable of your screen object.

C3DScreen s
s.CreateWindowed(0,0,640,480,@CAPTION|@SIZE,"3D Test - ESC exits",NULL,false)
SETCURSOR s.m_win,@CSCUSTOM,0
...

SETCURSOR s.m_win,@CSARROW
Title: Re: Turn off the mouse pointer in DirectX?
Post by: carpman2007 on March 20, 2009, 01:12:22 AM
Thank you!