Game Development Community

Using Windows Cursor

by Matt Huston · in Torque Game Engine · 11/15/2006 (7:42 am) · 3 replies

I am creating a windows application using TorqueScript and I would like to use the default windows cursor. I have done some editting in winWindow.cc, it works but causes the application to crash.

Tried...

case WM_MOUSEMOVE:
     // keep trying until we actually show it
     while(ShowCursor(TRUE) >= 0);
     break;

#1
11/15/2006 (12:37 pm)
There is a "noCursor" flag for all gui controls that you can set to false:

new GameTSCtrl(PlayGui)
{
....
noCursor = "0";
}

that will make the cursor appear which is basically the same as the default windows cursor. Search for noCursor on the forums the find out more.
#2
11/15/2006 (12:44 pm)
Matt -
i usually see that code as
while (ShowCursor(true) < 0) ;
or
while (ShowCursor(false) >= 0) ;

yeah - from MSDN:
Quote:
[the boolean argument] Specifies whether the internal display counter is to be incremented or decremented.
.. so yeah. try < 0 instead of >= 0.
#3
11/19/2006 (9:09 am)
The problem is that I would like to use the Windows XP cursor, what I am developing in TorqueScript is much like the Torque Show Tools or Constructor which use XP cursor without problem.