Sunday, November 6, 2011

How to Use Mouse in C language

How to Use Mouse in C language


 union REGS i,o;
 void initmos()
 {
i.x.ax=0;
int86(0x33,&i,&o);
 }
 void space(int size)
 {
int i;
int prevx,prevy;
prevx=wherex();
prevy=wherey();
gotoxy(prevx,prevy);
textattr(112);
for(i=1;i<=size;i++)
{
cprintf(" ");
}
gotoxy(prevx,prevy);
 }
 void showmos()
 {
i.x.ax=1;
int86(0x33,&i,&o);
 }
 void getmos(int *x,int *y,int *b)
 {
i.x.ax=3;
int86(0x33,&i,&o);
*b=o.x.bx;
*x=o.x.cx;
*y=o.x.dx;
 }

0 comments:

Post a Comment

You are most welcome for making comments here. I will consider your view and will reply you soon.