NULL,*s=NULL;Р FILE *fp;Рchar *menu[]={ "File ", "Edit ", "Search "};Рchar *red[]={ "F", "E", "S"};Рchar *f[]={ "NEW ", "Open" , "Save", "Another",Р"Quit alt_x "};Рchar *e[]={"Search","Search next","Replace","Date"};Рchar buf[16*10*2],buf1[16*2];Рtextbackground(3);Рclrscr(); Рwindow(1,1,80,1);Рtextbackground(WHITE);Рtextcolor(BLUE);Рclrscr(); Рwindow(1,1,80,2);Рfor(i=0, l=0; i <3;i++)Р{ Р x=wherex();Р y=wherey(); Р printf( " %s ",menu[i]);Р l=strlen(menu[i]); Р gotoxy(x,y);Р textcolor(BLUE);Р cprintf( " %s ",red[i]); Р x=x+l+4; Р gotoxy(x,y); Р textcolor(BLACK); Р} Рprintf("\n");Рprintf("You can take your note now:\n");Рscanf("%s",w);Рwhile(1)Р{ Р key=0; Р while (bioskey(1)==0);Р key=get_key(); Р执行某个功能后创建一个新界面函数,与主函数的代码一样。Р该界面与上面的原始记事本功能界面一样,功能也一样,目的是执行某个功能后,还可以使用其他的菜单的功能,实现菜单功能之间的嵌套和重复使用。