:?: Is there any way, in Turbo C++, by which we can make the mouse disappear when it enters a certain area of the screen ?
I have tried this but it doesnt seem to work completely....
------------------------------------------------------------------------------------
void initmouse()
{
union REGS in,out;
in.x.ax=0;
int86(0x33,&in,&out);
}
void showmouse()
{
union REGS in,out;
in.x.ax=1;
int86(0x33,&in,&out);
}
void hidemouse()
{
union REGS in,out;
in.x.ax=2;
int86(0x33,&in,&out);
}
int getcord(int &x,int &y)
{
union REGS in,out;
in.x.ax=3;
int86(0x33,&in,&out);
x=out.x.cx;
y=out.x.dx;
return out.x.bx;
}
void main()
{
int mousex,mousey;
initmouse();
showmouse();
if(getcord(mousex,mousey)==1)
{
if(mousex>=430&&mousex<=630&&mousey>=22&&mousey<=436)
showmouse();
else
hidemouse();
}
}
-----------------------------------------------------------------------------------
I can get the mouse to appear on the screen but it doesnt disappear on entering certain coordinates.
Please Help