Advertisement

Mouse & Nonexclusive Window

Started by February 28, 2000 05:32 PM
2 comments, last by Gorky 25 years ago
I''m currently writing a game editor. I decided to fix something I thought would be simple, but instead I tried in vain for 8 hours yesterday to make it work. I was trying to fix my game editor, so that the ''mouse cursor display'' behaves like the directx example program MouseNon. Basically, the mouse displays, over all windows, all the time. But, my first version, didn''t show the mouse at all. That''s do to the fact I''m using DirectDraw. No problem, I thought. I added my own cursor drawing function, and viola, a cursor. Worked great except one small detail. Neither other windows, nor my window''s menu were part of the window client area, so the cursor did not display over them. But I wanted to have my mouse appear anywhere on the screen. So I pulled in the code from MouseNon. It works great for anything like a dialog box. But this is due to the fact that that is GDI. But anytime it''s directdraw that''s writing to the window client area, only my client area shows the mouse. I spent 8 hours trying to get it to work and only made my code worse. If you have ever created a windows based non exclusive DirectDraw program and you have successfully gotten the mouse to display over the entire screen, could you please tell me how! Or if it''s not possible, please let me know. I have a suspicion, it''s not possible because, I have never seen an application setup like this. (e.g. Diquick example only displays the cursor, when the game is not running.) If it''s not possible, I guess I will soon be personally writing my cursor beyond my windows client area, without the help of directdraw or windows. I hope that is possible without breaking anything. Thanks in advance.
I''m no expert it this area, but I am pretty sure it is possible. Because in the WGPDUMB examples, a bug causes the mouse to show during the actual game every now and then. This is a guess, but I think it has to do with ShowCursor().

--BugSquash
Taeloid!
NARF!
Advertisement
That is not a bug from WGPDUMB. It actually happens in almost every windowed directdraw program I have ever seen.
It even happens when you have a NULL cursor!
I was breifly considering a way to get rid of it, but decided it was not worth the effort.
Since no has answered my question yet, I went searching.
I have found something good but not perfect.

I downloaded the CDX library and example programs. Example3 actually has a windowed mode of direct draw. It does not have the mouse in the client area, but does have the mouse visible outside of the windows frame!
I''m not sure why just yet.
It does lack a mouse pointer over the title bar and I''m assuming if it had a menu, over that as well.

This topic is closed to new replies.

Advertisement