Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

C Program to hide mouse pointer

Below is the C program to hide Mouse Pointer.

int initmouse() : function is used to intialize the mouse pointer. Which returns int value. Value 0 indicates Mouse support is not available.

void showmousepointer() : function is used to show mouse pointer. Which does not return any value.

void hidemousepointer() : function is used to hide mouse pointer. Which does not return any value.


Code:
#include
#include
#include
 
int initmouse();
void showmousepointer();
void hidemousepointer();
 
union REGS i, o;
 
main()
{
int status, count = 1, gd = DETECT, gm;
 
initgraph(&gd,&gm,"C:\\TC\\BGI");
 
status = initmouse();
 
if ( status == 0 )
printf("Mouse support not available.\n");
else
{
showmouseptr();
 
while(count10)
{
getch();
count++;
if(count%2==0)
hidemousepointer();
else
showmousepointer();
}
}
 
getch();
return 0;
}
 
int initmouse()
{
i.x.ax = 0;
int86(0X33,&i,&o);
return ( o.x.ax );
}
 
void showmousepointer()
{
i.x.ax = 1;
int86(0X33,&i,&o);
}
 
void hidemousepointer()
{
i.x.ax = 2;
int86(0X33,&i,&o);
}




This post first appeared on Ask For Program, please read the originial post: here

Share the post

C Program to hide mouse pointer

×

Subscribe to Ask For Program

Get updates delivered right to your inbox!

Thank you for your subscription

×