Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

change mouse cursor shape to a hand

184 views
Skip to first unread message

Hoc Phan

unread,
Sep 21, 2003, 7:21:19 PM9/21/03
to
Is there any option to change mouse cursor to a hand shape? I couldn't
find none using glutSetCursor(). This GLUT CURSOR INFO seems to be one
but it is actually not, it's just 2 arrows cross.

John Tsiombikas (Nuclear / the Lab)

unread,
Sep 22, 2003, 3:37:02 AM9/22/03
to

well I just tried it to make sure and I can definitely see a hand when
specifying GLUT_CURSOR_INFO. maybe your window-system is configurable in this
aspect and you set the hand cursor to something else?

-- Nuclear / the Lab --

Ingo Schulz

unread,
Sep 22, 2003, 4:29:06 AM9/22/03
to
John Tsiombikas (Nuclear / the Lab) schrieb:

Are you using Windoze or some other OS? For Windoze you get the SIZEALL
cursor. This is what's in glutwin32.h:

#define XC_hand1 IDC_SIZEALL

(XC_hand1 is GLUT_CURSOR_INFO)

The help file for LoadCursor says:

IDC_HAND Windows NT 5.0 and later: Hand

So GLUT does not support the hand cursor because it was written back
then in 1998. If you really want to have a hand cursor you'll have to
change the code of "glut_cursor.c" and compile GLUT. All you have to do
is add these lines in the "__glutSetCursor" function as the last case
for "switch (cursor)" (line 175):

#if defined(_WIN32)
default:
xcursor = (HCURSOR)cursor;
#endif

Thus you can pass not only GLUT_CURSOR_??? but also handles for mouse
cursors you load yourself with "LoadCursor" or "LoadImage", even user
defined cursors.

Ingo

Hubert Hoffmann

unread,
Sep 25, 2003, 5:33:02 PM9/25/03
to

Ingo Schulz wrote:

> John Tsiombikas (Nuclear / the Lab) schrieb:
>

....


>
> Are you using Windoze or some other OS? For Windoze you get the SIZEALL
> cursor. This is what's in glutwin32.h:
>
> #define XC_hand1 IDC_SIZEALL
>
> (XC_hand1 is GLUT_CURSOR_INFO)
>
> The help file for LoadCursor says:
>
> IDC_HAND Windows NT 5.0 and later: Hand
>
> So GLUT does not support the hand cursor because it was written back
> then in 1998. If you really want to have a hand cursor you'll have to
> change the code of "glut_cursor.c" and compile GLUT. All you have to do
> is add these lines in the "__glutSetCursor" function as the last case
> for "switch (cursor)" (line 175):
>
> #if defined(_WIN32)
> default:
> xcursor = (HCURSOR)cursor;
> #endif
>
> Thus you can pass not only GLUT_CURSOR_??? but also handles for mouse
> cursors you load yourself with "LoadCursor" or "LoadImage", even user
> defined cursors.
>
> Ingo
>

I want to connect a second mouse. Where can I find information how to
get two different cursors on the screen ?

Thanks

Hubert

Ingo Schulz

unread,
Sep 26, 2003, 4:20:35 AM9/26/03
to
Hubert Hoffmann schrieb:

> I want to connect a second mouse. Where can I find information how to
> get two different cursors on the screen ?

Sorry, can't help you there. I don't even know if it's possible to have
two mouse cursors.

Ingo

0 new messages