11 | (1 |
C Program to Hide Mouse Pointer : Dos Programming
C Program to Hide Mouse Pointer :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#include<graphics.h>
#include<conio.h>
#include<dos.h>
void showmouseptr();
void hidemouseptr();
union REGS i, o;
int main() {
int count = 1, gDriver = DETECT, gMode;
initgraph(&gDriver, &gMode,"C\\:tc\\bgi");
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);
}
|
1
2
|
i.x.ax = 0;
int86(0X33,&i,&o);
|
input | output | Comment |
ax=0x0000 | ax=0x0000 or 0xFFFF bx=number of buttons | 0x0000 installed 0xFFFF not installed |
Int 33,0×01 : Show Mouse cursor
input | output | Comment |
ax=0x0001 | none |
input | output | Comment |
Syntax :
1
|
int86 (int intr num, union REGS *inreg, union REGS *outreg);
|