Cursors, foiled again!

Started by
4 comments, last by Goodlife 23 years, 12 months ago
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.
-- Goodlife-----------------------------Those whom the gods would destroy, they first drive mad.--DirectX design team official motto
Advertisement
Sounds like a driver bug. Try the latest drivers and see what it does.

Josh
Covered in the SDK help.
Use IDirectDrawClipper::SetHWnd (or something like that) to make DirctX clip your primary surface.


The_Minister
[email=mwronen@mweb.co.za" onmouseOver="window.status='Mail The_Minister'; return true" onmouseOut="window.status=' '; return true]The_Minister[/email]1C3-D3M0N Interactive
A Clipper is NOT the answer. I''m almost positive his problem is from bad drivers.

Josh
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.
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
[email=mwronen@mweb.co.za" onmouseOver="window.status='Mail The_Minister'; return true" onmouseOut="window.status=' '; return true]The_Minister[/email]1C3-D3M0N Interactive

This topic is closed to new replies.

Advertisement