Show Mouse Using C- snippet
========================
#include<dos.h>
#include<graphics.h>
#include<conio.h>
#include<stdio.h>
initmouse();
void showmouseptr();
union REGS i,o;
struct SREGS s;
int button,x,y;
initmouse()
{
i.x.ax = 0;
int86( 0x33 , &i , &o );
return(o.x.ax);
}
void showmouseptr()
{
i.x.ax=1;
int86(0x33,&i,&o);
}
void getmousepos(int *button, int *x, int *y)
{
union REGS i,o;
i.x.ax=3;
int86( 0x33 , &i, &o);
*button = o.x.bx;
*x = o.x.cx;
*y = o.x.dx;
}
No comments:
Post a Comment