Skip to main content
gamedev.net
🔒 Locked

Cursor problem

Started by niazware Jun 7, 2006 at 4:08 PM 2 replies 600+ views
Original Post
niazware
niazware
hi everybody I've a strange problem concerning the mouse cursor in full screen mode, I can successfully hide the mouse cursor in full-screen mode, I use my own cursor (actually I use an image - a sprite - for my cursor and change its position according to mouse movement obtained from DirectInput), when I move the mouse to corners (specially top-right) the Windows cursor reappears and even causes problems for the game, for instance clicking at the right-top corner causes the program to close (because when I run the game from Visual Studio environment, there is a close button in the top-right corner which is being clicked) I've set the hCursor of WNDCLASSEX to null, and I've called both D3D and Windows cursor functions for hiding the cursor: SetCursor( NULL ); Device->ShowCursor( FALSE ); ShowCursor( FALSE ); what should I do? what's the problem, what's going wrong here" thanks in advance
Palidine
Palidine
every frame you can(should?) also set the cursor position to the center of the screen

-me
Bliz23
Bliz23
I had the same problem. It's something with the frame of your window. When you create a window in your full screen you still have a pixel frame around the window that you probably can't see. So what I did is i created the window with no frame, I think it was the option that had popup in the name. I'm not sure, if you really want to know what it is, just pm me. Hope that helps.
load_bitmap_file
load_bitmap_file
As Bliz23 said, check your window style flags and use something like WS_POPUP instead of WS_POPUPWINDOW, you don't want those minimize, maximize, frames, etc if you're running fullscreen. Also, setting the cursor to null/hiding it will only cause it to not appear, it will still be perfectly functional, only invisible.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.