mouse pointers. BCB.
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
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
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
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement