Archived

This topic is now archived and is closed to further replies.

Zoomby

Get rid of hourglass cursor

Recommended Posts

hi! how can I get rid of the hourglass cursor in a windowed directX application? I set the cursor to IDC_ARROW in the window class, but when I start the app there is always a hourglass. Only after minimizing the window a few times the arrow cursor appears. (I''m using a standard game loop within the message pump) bye chris

Share this post


Link to post
Share on other sites
ok, here''s the problem & solution.
I wanted to remove the cursor when windowed mode is true. To do it you can use the WM_SETCURSOR message in the Window Proc.
The mistake was to return true, even if SetCursor(NULL) wasn''t called.
See the code below.

Bye
Chris




//wrong

case WM_SETCURSOR:
if (!windowed)
{
SetCursor(NULL);
}
return TRUE;

//------------------------------------------------



//right

case WM_SETCURSOR:
if (!windowed)
{
SetCursor(NULL);
return TRUE;
}
break;



Share this post


Link to post
Share on other sites