Archived

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

Antoxa

Stupid Mouse Cursor

Recommended Posts

In my game I have to hide current mouse cursor to draw my own one. And I do like this: void Video_Init (void) { HWND mainwindow; // main window handle ... // switch video mode if it''s necessary if (switchmode) ChangeResolution (); mainwindow = CreateMainWindow (); SetForegroundWindow (mainwindow); SetCapture (mainwindow); ShowCursor (false); ... } But after the game switches the video mode the mouse cursor do not disapear and remains visible until the next mouse button click. And after the click the main window loses its focus and becomes inactive until the next mouse button click. What does all this mean? And how can I hide the stupid cursor even after the video mode switching?

Share this post


Link to post
Share on other sites
It sounds like your window may be too small. Are you sure you''re setting it to the same dimensions as your resolution? Also, what window styles are you using?

Share this post


Link to post
Share on other sites
Have you tried removing the system cursor before switching video modes? If the system cursor is going to be removed in all cases, then remove it before taking any other action that does not require its presence. (I''ve never had to touch WM_SETCURSOR messages either.)



MatrixCubed
http://MatrixCubed.org






Share this post


Link to post
Share on other sites