From: Ludvig Larsson Newsgroups: comp.os.msdos.djgpp Subject: Re: Aaargh! My mouse function is still not working!!! Date: Thu, 22 Oct 1998 00:23:28 +0200 Organization: Faas-Goldhart Lines: 32 Message-ID: <362E5EE0.74B0@club-internet.fr> References: <70li81$qqf$1 AT nnrp1 DOT dejanews DOT com> NNTP-Posting-Host: toulouse-camichel7-60.club-internet.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: front4.grolier.fr 909008020 25168 195.36.147.60 (21 Oct 1998 22:13:40 GMT) NNTP-Posting-Date: 21 Oct 1998 22:13:40 GMT X-Mailer: Mozilla 3.01C-CLUB (Win95; I) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I have some code that checks mose dx,dy etc. the first thing that differs is that I use __dpmi_int(0x33,..... Second, to see if a button is down, I use subfunction 0x5 and 0x6 instead of 0x3. 0x5 same invalues, returns(nr of times button pushed since last call) 0x6 same invalues, returns(nr of times button released since last call) Maybe another function will do, but I see now that you use subfunc 0x3 Both to check the buttonstate and to to get the absolute mosemovement. For the relative mousemovement, you got a problem: You: x=... y=... Should be: x=x+... y=y+... And, if you'r getting the right results from the absolut_position func, and you'r not checking the figures, you'll blow memoryprotection. Why? because the mousepositions are NOT limited to screen coordinates so you can end up with plotting at (-1000,50000) or anywhere else. HTH Ludvig Larsson