#include <graphics
.
h>
#include <conio
.
h>
#include <stdio
.
h>
#include <dos
.
h>
#include <D:\BC31\mousedsg
.
dat>
unsigned NewCurs[
32
];
int HotPointX,HotPointY;
void main()
HotPointX=(
char
)(MouseDsgn1[
16
]>>
8
);
HotPointY=(
char
) MouseDsgn1[
16
];
struct REGPACK reg;
reg
.
r_ax=
0
; intr(0x33,®);
if
(reg
.
r_ax ==
0
)
else
int gdriver = DETECT, gmode, errorcode;
initgraph(&gdriver,&gmode,"G:\\PROGRAMS\\BC31\\BGI");
if
((errorcode = graphresult()) != grOk)
reg
.
r_bx=HotPointX;
reg
.
r_cx=HotPointY;
reg
.
r_es=FP_SEG(&NewCurs);
reg
.
r_dx=FP_OFF(&NewCurs);
reg
.
r_ax=
9
; intr(0x33,®);
reg
.
r_ax=
1
; intr(0x33,®);
int Xp = -
1
,Yp = -
1
;
while
(!kbhit())
else
if
( reg
.
r_bx ==
1
)
else
if
( reg
.
r_bx ==
2
)
else
if
( reg
.
r_bx ==
3
)
else
printf(" UnKnown buttons combination...%d ",reg
.
r_bx);
Xp = reg
.
r_cx;
Yp = reg
.
r_dx;
}
closegraph();
}