InitScreen(void)
{
window(1,1,80,25);
textattr(0x17);
clrscr();
window(1,1,80,1);
textattr(0x3e);
clrscr();
window(1,24,80,24);
textattr(0x74);
clrscr();
cputs(edithelp);
window(1,25,80,25);
textattr(0x6a);
clrscr();
Wind(1,2,80,23,2,1,15);
window(1,25,80,25);
textattr(0x6e);
cputs(mainhelp);
}
/*画框架*/
Wind(int x1,int y1,int x2,int y2,int FrmTp,int BCl,int TCl)
{
int i;
int c[2][6]={{0xda,0xc4,0xbf,0xb3,0xc0,0xd9},
{0xc9,0xcd,0xbb,0xba,0xc8,0xbc}};
textcolor(TCl); //设置在显示窗口中的字体颜色
textbackground(BCl);
window(x1,y1,x2,y2);
clrscr();
if(FrmTp)
{
window(1,1,80,25);
gotoxy(x1,y1);
putch(c[FrmTp-1][0]);
for(i=x1+1;i<x2;i++)
putch(c[FrmTp-1][1]);
putch(c[FrmTp-1][2]);
for(i=y1+1;i<y2;i++){
gotoxy(x1,i);
putch(c[FrmTp-1][3]);
gotoxy(x2,i);
putch(c[FrmTp-1][3]);
}
gotoxy(x1,y2);
putch(c[FrmTp-1][4]);
for(i=x1+1;i<x2;i++)
putch(c[FrmTp-1][1]);
putch(c[FrmTp-1][5]);
}
window(x1+1,y1+1,x2-1,y2-1);
}
int GetKey(void)
{
union {
unsigned int x;
unsigned char y[2];
}key1;
while(bioskey(1) == 0);
key1.x=bioskey(0);
return (key1.y[0]==0? (key1.y[1]+256): key1.y[0]);
}
SelectMenu(void)
{
while(Key != ESC)
{
Key = GetKey();
if(Key==LEFT || Key==RIGHT)SlectMai