如果您无法下载资料,请参考说明:
1、部分资料下载需要金币,请确保您的账户上有足够的金币
2、已购买过的文档,再次下载不重复扣费
3、资料包下载后请先用软件解压,在使用对应软件打开
#include<process.h>#include<stdlib.h>#include<stdio.h>#include<dos.h>#include<conio.h>#definekey_down80#definekey_up72#definekey_esc1#definekey_alt_f33#definekey_alt_x45#definekey_enter28intget_key();voidbox(intstartx,intstary,inthigh,intwidth);main(){inti,key,x,y,l;char*menu[]={"File","Edit","Run","Options","Help","Setup","Zoom","Menu"};char*red[]={"F","E","R","O","H","S","Z","M"};char*f[]={"Loadfile","Savefile","Print","Modify","Quitalt_x"};charbuf[16*10*2],buf1[16*2];while(1){textbackground(1);clrscr();window(1,1,80,1);textbackground(15);textcolor(0);clrscr();window(1,1,80,2);for(i=0,l=0;i<8;i++){x=wherex();y=wherey();cprintf("%s",menu[i]);l=strlen(menu[i]);gotoxy(x,y);textcolor(RED);cprintf("%s",red[i]);x=x+l+4;gotoxy(x,y);textcolor(BLACK);}x=0;key=0;while(bioskey(1)==0);key=get_key();if(key==key_alt_x)exit(0);if(key==key_alt_f){textbackground(0);textcolor(15);gotoxy(2,1);cprintf("%s",menu[0]);gettext(4,2,18,12,buf);window(4,2,19,8);textbackground(15);textcolor(0);clrscr();window(4,2,19,9);box(1,1,7,16);for(i=2;i<7;i++){gotoxy(2,i);cprintf("%s",f[i-2]);}gettext(2,2,18,3,buf1);textbackground(0);textcolor(15);gotoxy(2,2);cprintf("%s",f[0]);y=2;key=get_key();while(key!=key_alt_x&&key!=key_enter&&key!=key_esc){if(key==key_up||key==key_down){puttext(2,y,18,y+1,buf1);if(key==key_up)y=y==2?6:y-1;if(key==key_down)y=y==6?2:y+1;gettext(2,y,18,y+1,buf1);textbackground(0);textcolor(15);gotoxy(2,y);cprintf("%s",f[y-2]);}key=get_key();}if(key==key_alt_x)exit(0);if(key==key_enter){switch(y-1){case1:break;case2:break;case3:break;case4:break;case5:exit(0);default:break;}}else{window(1,1,80,2);puttext(4,2,19,10,buf);textbackground(15);textcolor(0);gotoxy(2,1);cprintf("%s",menu[0]);}}}}intget_key(){unionREGSrg;rg.h.ah=0;int86(0x16,&rg,&rg);returnrg.h.ah;}voidbox(intstartx,intstarty,inthigh,intwidth){inti;gotoxy(startx,starty);putch(0xda);for(i=startx+1;i<width;i++)putch(0xc4);putch(0xbf);for(i=starty+1;i<high;i++){gotoxy(startx,i);putch(0xb3);gotoxy(width,i);putch(0xb3);}gotoxy