Board index » cppbuilder » mouse question...???
mujeebrm
![]() CBuilder Developer |
mouse question...???2005-09-30 12:45:40 AM cppbuilder52 /* mice.c-win xp-bc5.02-tc3.0*/ #include <stdio.h> #include <conio.h> #include <ctype.h> #include <dos.h> // and masks for mouse buttions bit 0>1 and bit 1>2 #define LBUTP 1 #define RBUTP 2 int main(void) { union REGS regs; int c=0, b=0; regs.x.ax = 0x1; // show mouse pointer int86(0x33, ®s, ®s); clrscr(); while( c != 'e') { c=getch(); regs.x.ax = 0x3; // retun button status & co-ords int86(0x33, ®s, ®s); b=regs.x.bx; if(b & LBUTP )//if left button pressed { gotoxy(regs.x.cx, regs.x.dx);// goto x y co-ords putch('x');// print this- but this does not happen } } return 0; } |