Archived

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

GEo

Cursor Problem - Please Help

Recommended Posts

Hi ya, I''ve got a really wierd problem that''s really stressing me out. I''m writing a level editor for a game I''m working on, and I need the mouse cursor to be visible and usable, and I need to be able to change the cursor occaisionally. If I don''t specify a mouse cursor, I get an hourglass, as you might expect. If I give the hCursor property in the WNDCLASSEX a hCursor (returned by LoadCursor(NULL, IDC_ARROW)) it will work for some cursors (eg IDC_CROSS) but not others (eg IDC_ARROW) If I use SetCursor, I don''t get any cursor at all (for this I use the code similar to the following: HCURSOR hcr_Arrow; hcr_Arrow = LoadCursor(NULL, IDC_ARROW); if (hcr_Arrow != NULL) { SetCursor(hcr_Arrow); ShowCursor(true); } ) I have not done anything with the WM_SetCursor. Now this all seems to work fine on all the computers I''ve tried it on, except mine! Any suggestions would be greatly appreciated. George. "Who says computer games affect kids, imagine if PacMan affected us as kids, we'd all sit around in a darkened room munching pills and listening to repetitive music....uh oh!"

Share this post


Link to post
Share on other sites
I''m working with GEo on this. Another thing about this problem all computers are PS2 except for the one which doesn''t work...that one has the mouse on COM1. I would have thought that windows would have dealed with that and it wouldn''t cause a problem...any suggestions?

//--- Created by Tom Oram ---
// tom.oram@vodafone.net

Share this post


Link to post
Share on other sites
If you are having a problem changing the cursors, why don''t you just not show the cursor and use a bitmap instead?

You can easily turn the cursor off using ShowCursor(FALSE) You might want to look it up though cause I think it may be spelled with all caps. Then obtain the cursors position and replace it with a bitmap. Simple as pie. I hope I explained this good, if I didn''t e-mail me and I will send you an example.

Visit http://members.xoom.com/ivanickgames

Share this post


Link to post
Share on other sites
Hi C++ Freak ( Sounds like I''m being offensive)

I thought about doing it that way, and I tried it using the WM_MOUSEMOVE event, but it was not called frequently enough and the cursor jumped about.

I guess I could stick a GetCursorPos in the message handling loop, couldn''t I.

I would like to get the proper mouse cursors working anyway, so if anyone has any help regarding this, it will be gratefully received.

George.

"Who says computer games affect kids, imagine if PacMan affected us as kids, we'd all sit around in a darkened room munching pills and listening to repetitive music....uh oh!"

Share this post


Link to post
Share on other sites