C Program to Hide Mouse Pointer : Dos Programming

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

void showmouseptr();
void hidemouseptr();

union REGS i, o;

int main()
{
    int  count = 1, gDriver = DETECT, gMode;

    initgraph(&gDriver,&gMode,"C:tcbgi");

    i.x.ax = 0;
    int86(0X33,&i,&o);

    if(o.x.ax == 0)
    {
        printf("ntMouse Support is Unavailable !!");
    }
    else
    {
        showmouseptr();

        while(count<=10)
        {
            getch();
            count++;
            if(count%2==0)
                hidemouseptr();
            else
                showmouseptr();
        }
    }
    getch();
    return 0;
}

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

void hidemouseptr()
{
    i.x.ax = 2;
    int86(0X33,&i,&o);
}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s