Here a program to show mouse pointer in dos graphics mode and also sense the clicking effect. Just Enjoy it.
#include<stdio.h> #include<dos.h> #include<graphics.h> #include<conio.h> void main() { int gd=DETECT,gm,x,y; union REGS in,out; initgraph(&gd,&gm,""); in.x.ax=0; int86(0x33,&in,&out); in.x.ax=1; int86(0x33,&in,&out); in.x.ax=3; while(!kbhit()) { int86(0x33,&in,&out); x=out.x.cx; y=out.x.dx; if(out.x.bx==1) putpixel(x,y,RED); } closegraph(); }**Before running the program u have 2 copy the file named 'egibgi.bgi' in the current directory.
Comments