KS> I'm looking for an easy way to get the mousepointer's coordinates on a
KS> mouseclick-event...
You can do this 2 ways, firstly with a LIBRARY which will make it easyer for
you probably, and you could also use bios calls, like the example below :
void main(void) {
------ REMOVE THIS LINE , Load the mouse : -------
union REGS regs;
regs.x.ax = 0;
int86(0x33, ®s, ®s);
if (regs.x.ax == 0) {----- NO MOUSE FOUND -----}
------ REMOVE ALL LINES including '-'s , put the mouse on the screen ---
union REGS regs;
regs.x.ax = 1;
int86(0x33, ®s, ®s);
while(!1) {
------ This code below will return the status of the mouse -----
union REGS regs;
regs.x.ax = 3;
int86(0x33, ®s, ®s);
printf("MOUSE - X = %d\n",regs.x.cx);
printf("MOUSE - Y = %d\n",regs.x.dx);
printf("MOUSE - Buttons = %d",regs.x.bx);
}
}
-=- DANIEL HEBBERD -=-
--- Renegade v666 dMp
---------------
* Origin: dMp ][, Man can not live on Toons alone... (3:774/750)
|