消除鼠标光标在屏幕上混乱的一种方法
//鼠标接口程序
void mouse(int *ml,int *m2,int *m3,int *m4)
{
union REGS inregs,outregs;
inregsx.ax=m1;
inregs.x.bx=*m2;
inrregs.x.cx=m3;
inregs.x.dx=*m4;
int86(ox33,&inregs,&outregs);/*包含于dos.h*/
*m1=outregs.x.ax;
*m2=outregs.x.bx;
*m3=outregs.x.cx;
*m4=outregs.x.dx;
}
//鼠标驱动程序在位检测
int check-Mouse-Driver(void)
{
void far *address;
address=getvect(ox33);
ifaddress==NULL‖
(*(unsignedcharfar*)
address==oxcf))
return False;//33H中断为空或伪中断return True;
}
//隐藏鼠标光标
void Hide Mouse(void)
{
intm1,m2,m3,m4;
if(check-Mouse-Driver()==True)
{
m1=2;//隐藏鼠标功能调用
mouse(&m1,&m2,&m3,&m4);
}
return;
}
//显示鼠标光标,
void show mouse(void)
{
intm1,m2,m3,m4;
if(check-Mouse-Driver()==True)
{
m1=1;
mouse(&m1,&m2,&m3,&m4);
}}