* Mouse Pointer */
#include
#include
#include
#include
union REGS i,o;
struct SREGS s;
int cursor[32] = {
0x0000,0x0000,0x0000,0x0000,
0x8001,0xc003,0xf00f,0xfc3f,
0xfc3f,0xf00f,0xc003,0x8001,
0x0000,0x0000,0x0000,0x0000,
0xffff,0x8001,0xffff,0x8001,
0x4002,0x2004,0x1008,0x0240,
0x0240,0x0810,0x2004,0x4002,
0x8001,0xffff,0x8001,0xffff
};
**** main()
{
int gd,gm;
int initmouse();
**** showmouseptr();
**** changecursor(int*);
detectgraph(&gd,&gm);
initgraph(&gd,&gm,"");
if(initmouse()==0)
{
closegraph();
[Linkleri görebilmek için üye olun veya giriş yapın.]("nMouse
Drivers Not Loaded");
exit(1);
}
gotoxy(10,1);
[Linkleri görebilmek için üye olun veya giriş yapın.]("Press
any key to exit...");
changecursor(cursor);
showmouseptr();
getch();
}
initmouse() /* Initializes Mouse Pointer */
{
i.x.ax=0;
int86(0x33,&i,&o);
return(o.x.ax);
}
**** showmouseptr() /* Displays Mouse Pointer */
{
i.x.ax=1;
int86(0x33,&i,&o);
}
**** restrictmouseptr(int x1,int y1, int x2, int y2) /* Restricts Mouse
Movement */
{
i.x.ax=7;
i.x.cx=x1;
i.x.dx=x2;
int86(0x33,&i,&o);
i.x.ax=8;
i.x.cx=y1;
i.x.dx=y2;
int86(0x33,&i,&o);
}
**** getmousepos(int *button, int *x, int *y)
{
i.x.ax=3;
int86(0x33,&i,&o);
*button=o.x.bx;
*x=o.x.cx;
*y=o.x.dx;
}
**** changecursor(int *shape)
{
i.x.ax=9; /* Service Number */
i.x.bx=0; /* Actual Cursor Position from left */
i.x.cx=0; /* Actual Cursor position from top */
i.x.dx=(unsigned)shape; /* Offset address of pointer image */
segread(&s);
s.es=s.ds; /* Segment Address of pointer */
int86x(0x33,&i,&i,&s);
}
#include
#include
#include
#include
union REGS i,o;
struct SREGS s;
int cursor[32] = {
0x0000,0x0000,0x0000,0x0000,
0x8001,0xc003,0xf00f,0xfc3f,
0xfc3f,0xf00f,0xc003,0x8001,
0x0000,0x0000,0x0000,0x0000,
0xffff,0x8001,0xffff,0x8001,
0x4002,0x2004,0x1008,0x0240,
0x0240,0x0810,0x2004,0x4002,
0x8001,0xffff,0x8001,0xffff
};
**** main()
{
int gd,gm;
int initmouse();
**** showmouseptr();
**** changecursor(int*);
detectgraph(&gd,&gm);
initgraph(&gd,&gm,"");
if(initmouse()==0)
{
closegraph();
[Linkleri görebilmek için üye olun veya giriş yapın.]("nMouse
Drivers Not Loaded");
exit(1);
}
gotoxy(10,1);
[Linkleri görebilmek için üye olun veya giriş yapın.]("Press
any key to exit...");
changecursor(cursor);
showmouseptr();
getch();
}
initmouse() /* Initializes Mouse Pointer */
{
i.x.ax=0;
int86(0x33,&i,&o);
return(o.x.ax);
}
**** showmouseptr() /* Displays Mouse Pointer */
{
i.x.ax=1;
int86(0x33,&i,&o);
}
**** restrictmouseptr(int x1,int y1, int x2, int y2) /* Restricts Mouse
Movement */
{
i.x.ax=7;
i.x.cx=x1;
i.x.dx=x2;
int86(0x33,&i,&o);
i.x.ax=8;
i.x.cx=y1;
i.x.dx=y2;
int86(0x33,&i,&o);
}
**** getmousepos(int *button, int *x, int *y)
{
i.x.ax=3;
int86(0x33,&i,&o);
*button=o.x.bx;
*x=o.x.cx;
*y=o.x.dx;
}
**** changecursor(int *shape)
{
i.x.ax=9; /* Service Number */
i.x.bx=0; /* Actual Cursor Position from left */
i.x.cx=0; /* Actual Cursor position from top */
i.x.dx=(unsigned)shape; /* Offset address of pointer image */
segread(&s);
s.es=s.ds; /* Segment Address of pointer */
int86x(0x33,&i,&i,&s);
}
En son TanriLar_OkuLu tarafından Perş. Mayıs 06, 2010 4:49 pm tarihinde değiştirildi, toplamda 1 kere değiştirildi