Jump to content
  • Advertisement

Archived

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

Goodlife

Cursors, foiled again!

This topic is 6696 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

Hi all, Sometimes, not all the time, when I run my direct3d program, the cursor flutters through. See, early on, I do a ShowCursor(FALSE) to get rid of it. Problem is, sometimes it reappears and starts throwing little white boxes on my surfaces. They don''t stay on past the next blt, but they''re very annoying. It only happens sometimes! I even set up some conditions, like CONSTANTLY doing a ShowCursor(FALSE) (still shows through) and even defining the windows mouse cursor to be a blank square (still shows through, and, paradoxically, appears as the white arrow). Does directx or direct3d do any windows cursor manipulation!?!? -- Goodlife ----------------------------- Think of your mind as a door on a house. Leave the door always closed, and it's not a house, it's a prison. Leave the door always open, and it's not a house, it's a wilderness-- all the vermin creep in.

Share this post


Link to post
Share on other sites
Advertisement
I''ve experienced the same problem. You''re not alone.
I gave up on fixing it (Just a map editor anyway.)
I was running windowed mode vs. exculsive DD.

The weird thing is, the cursor would briefly pop up over even my own blitted cursor.
So it was acting almost as if, briefly during some flips, windows was allowed to grab the primary to write to, but only for the mouse pointer. (Even though I said no cursors via ShowCursor.)

All windowed applications I have ever run, have this problem, so I think Josh is correct.

Share this post


Link to post
Share on other sites
From DirectX 7 SDK Help:

When you use the system mouse cursor, you will sometimes fall victim to graphic artifacts that occur when you blit to parts of the primary surface. These artifacts appear as portions of the mouse cursor seemingly left behind by the system.

[C++]
A DirectDrawClipper object can prevent these artifacts from appearing by preventing the mouse cursor image from "being in the way" during a blit operation. It''s a relatively simple matter to implement, as well. To do so, create a DirectDrawClipper object by calling the IDirectDraw7::CreateClipper method. Then, assign your application''s window handle to the clipper with the IDirectDrawClipper::SetHWnd method. Once a clipper is attached, any subsequent blits you perform on the primary surface with the IDirectDrawSurface7::Blt method will not exhibit the artifact.


Maybe I have the wrong problem in mind?



The_Minister

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!