⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 myfunc.cpp

📁 这是一个基于dos的dbms
💻 CPP
字号:
#include <conio.h>
#define SAVE struct text_info old;\
	     gettextinfo(&old);\
	     window(1,1,80,25);
#define RESTORE window(old.winleft,old.wintop,old.winright,old.winbottom);\
		gotoxy(old.curx,old.cury);\
		textattr(old.attribute);
int HintColor=YELLOW;
int HintBack=RED;
void Hint(char *s){
 SAVE
 textcolor(HintColor);
 textbackground(HintBack);
 gotoxy(1,25);
 clreol();
 cputs(s);
 RESTORE
 }
void Rectangle(int x1,int y1,int x2,int y2){
int i;
SAVE
for(i=x1+1;i<x2;i++){
 gotoxy(i,y1);putch(196);
 gotoxy(i,y2);putch(196);
 }
for(i=y1+1;i<y2;i++){
 gotoxy(x1,i);putch(179);
 gotoxy(x2,i);putch(179);
 }
 gotoxy(x1,y1);putch(218);
 gotoxy(x1,y2);putch(192);
 gotoxy(x2,y1);putch(191);
 gotoxy(x2,y2);putch(217);
 RESTORE
}
int PromptColor=YELLOW;
int PromptBack=RED;

int Prompt(char *s){
 char Buf[80*2];
 int retval;
 SAVE
 gettext(1,25,80,25,Buf);
 textcolor(PromptColor);
 textbackground(PromptBack);
 gotoxy(1,25);
 clreol();
 cputs(s);
 retval=getch();
 puttext(1,25,80,25,Buf);
 RESTORE
 return retval;
 }
#include <dos.h>
 unsigned Cursor=0xffff;
void HideCursor(){
 union  REGS r;
 r.h.ah=3;
 r.h.bh=0;
 Cursor=int86(0x10,&r,&r);
 r.h.ah=1;
 r.x.cx=0xffff;
 int86(0x10,&r,&r);
}
/*///////////////////////////////////////////////*/
void ShowCursor(){
 union REGS r;
 r.h.ah=1;
 r.x.cx=Cursor;
 int86(0x10,&r,&r);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -