Sie sind auf Seite 1von 1

#include<dos.

h>
#include<conio.h>
#include<stdio.h>
#include<graphics.h>
void main()
{
int driver,mode;
driver=DETECT;
mode=DETECT;
initgraph(&driver,&mode,"");
cleardevice();
/*the initial 4 lines to initialize the mouse pointer*/
_AX=0;
geninterrupt(0x33);
_AX=1;
geninterrupt(0x33);
while (!kbhit())
{
_AX = 3;/*used to support the statements 1 & 2*/
geninterrupt(0x33);
int CurPosX = _CX;/**********1************/
int CurPosY = _DX;/**********2************/
gotoxy(1,1);
setfillstyle(1,16);
bar(0,0,100,15);
printf("%d,%3d",CurPosX,CurPosY);
delay(10);
}
}

Das könnte Ihnen auch gefallen