Jump to content
  • Advertisement

Archived

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

stevenmarky

mouse pointers. BCB.

This topic is 6557 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve been making a game in DirectX7 on Borland C++ Builder 4. I''ve started from the DirectDrw examples they have given you, normally if I had made a DirectDraw program in a non-visual compiler the mouse pointer would not be shown, but in this case it is. Why? How do I stop the cursor being shown? DX++ The DirectX Programming Site

Share this post


Link to post
Share on other sites
Advertisement
I had the same problem with my Delphi DirectX game engine. When in windowed mode, the mouse cursor was always visible if outside the application window. The cause of this is that once you acquire the mouse in DirectInput, the ShowCursor() WinAPI function has no effect. What you do is set the window cursor to NULL (Form1->Cursor = crNone) and then set the mouse cursor to be positioned in the centre of your window by using SetCursorPos().

Note for Windows 2000: Always keep the mouse cursor inside the bounds of your application window. This way your application gets more CPU time slices than if the mouse cursor is positioned outside the application window.



Steve 'Sly' Williams
Tools Developer
Krome Studios

Share this post


Link to post
Share on other sites
Correction: Not always your program gets more CPU when the mouse is inside the window. For example, in my case, when ICQ is open (not minimized) and the program runs (not overlapping with ICQ) - the effect exists, program speeds up when the cursor is inside the window. When ICQ is minimized or not run - there''s no difference.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!