#include<stdio.h> #include<conio.h> #include<bios.h>
int key,fx,fy; char * zixiang[]={"files>>...","picture","do data>>", "cpunt","exit"}; void huanjing(void); void zikuang(); void kongjian(void); void where(void);
main() {do {huanjing(); where(); zikuang(fx,fy); kongjian(); where(); zikuang(fx,fy); }while(1); }
void huanjing(void) { window(1,1,80,25); textbackground(YELLOW); clrscr(); window(2,2,79,24); textbackground(WHITE); clrscr(); }
void where(void) {do {while(bioskey(1)==0); key=bioskey(0); switch(key) {case 19200:fx--;break; /*left */ case 18432:fy--;break; /*up */ case 19712:fx++;break; /*right */ case 20480:fy++;break; /*down */ } if(fx>74) fx=3; if(fx<3) fx++; if(fy>19) fy=0; if(fy<3) fy++; gotoxy(fx,fy); }while(key!=7181);
}
void zikuang() {int i; fx=fx+2; fy=fy+2; window(fx,fy,fx+10,fy+5); textbackground(GREEN); textcolor(YELLOW); clrscr(); for(i=0;i<5;i++) cprintf("%-8s\r\n", zixiang[i]);
} void kongjian(void) {int ky,old; ky=old=0; do {window(fx,fy+old,fx+10,fy+old); textbackground(GREEN); textcolor(YELLOW); clrscr(); cprintf("%-8s",zixiang[old]); window(fx,fy+ky,fx+10,fy+ky); textbackground(BLACK); textcolor(WHITE); clrscr(); cprintf("%-8s",zixiang[ky]); old=ky; while(bioskey(1)==0); key=bioskey(0); switch(key) {case 20480: ky=ky+1;break; case 18432: ky=ky-1;break; } if(ky>=5) ky=ky-5; if(ky<0) ky=ky+5;
}while((0<=ky<5)&&(key!=7181)); if(key==7181&&ky==0) {clrscr(); zikuang(fx,fy); } else if(key==7181&&ky==3) {clrscr(); zikuang(fx,fy); } } 没帮 你仔细做,自己修改下估计没问题吧