📄 ourmouse.cpp
字号:
#include"ourmouse.H"
int initmouse()
{
union REGS inr,outr;
inr.x.ax=0;
int86(0x33,&inr,&outr);
return outr.x.ax;
}
void showmouse()
{
union REGS inr,outr;
inr.x.ax=1;
int86(0x33,&inr,&outr);
}
void hidemouse()
{
union REGS inr,outr;
inr.x.ax=2;
int86(0x33,&inr,&outr);
}
void readmouse(int *f,int *x,int *y)
{
union REGS inr,outr;
inr.x.ax=3;
int86(0x33,&inr,&outr);
*f=outr.x.bx;
*x=outr.x.cx;
*y=outr.x.dx;
}
void newbutton(int startx,int starty,int endx,int endy)
{
setcolor(WHITE);
line(startx,starty,startx,endy);
line(startx,starty,endx,starty);
setcolor(BLACK);
line(endx,starty,endx,endy);
line(startx,endy,endx,endy);
}
/* draw a new button when it is pushed */
void pushbutton(int startx,int starty,int endx,int endy)
{
setcolor(BLACK);
line(startx,starty,startx,endy);
line(startx,starty,endx,starty);
setcolor(WHITE);
line(endx,starty,endx,endy);
line(startx,endy,endx,endy);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -