Tuesday, September 18, 2012

Code#101:C Program to display mouse pointer in graphics mode

| |
#include<graphics.h>
#include<conio.h>
#include<dos.h>

int initmouse();
void showmouseptr();

union REGS i, o;

main()
{
   int status, gd = DETECT, gm;

   initgraph(&gd,&gm,"C:\\TC\\BGI");

   status = initmouse();

   if ( status == 0 )
      printf("Mouse support not available.\n");
   else
      showmouseptr();

   getch();
   return 0;
}

int initmouse()
{
   i.x.ax = 0;
   int86(0X33,&i,&o);
   return ( o.x.ax );
}

void showmouseptr()
{
   i.x.ax = 1;
   int86(0X33,&i,&o);
}

1 comments:

AOL is one of the reliable email services that is used by many users. It comes with great features. However, while using the AOL web-based email service, many users confront various issues. These issues become the hurdle between the effective working of the AOL Customer service number uk email. A user can dial our AOL Customer support number and get in touch with us.

Post a Comment

Powered by Blogger.