Programming 版 (精华区)
发信人: Scorpion (你想过吗?), 信区: Programming
标 题: test.c
发信站: 哈工大紫丁香 (2002年10月18日14:53:55 星期五), 站内信件
#include "menu.c"
static char *items[]={"Create Pa","Create Pb","Pa+Pb","Pa-Pb","Pa*Pb","Pa/Pb",
"Delete Pa","Delete Pb","Exit"};
MENU Menu;
VIEW View,PaView,PbView;
VIEW CreateView,ShowView;
void Init()
{
hidecursor();
View_init(&View, 4,3,72,4, DARKGRAY,YELLOW,DOUBLELINE);
View_init(&CreateView, 20,10,50,3,BLUE,YELLOW,DOUBLELINE);
View_init(&ShowView, 1,15,80,4,BLACK,YELLOW,NOBORDER);
View_init(&PaView, 1,19,80,3,BLACK,YELLOW,NOBORDER);
View_init(&PbView, 1,22,80,3,BLACK,YELLOW,NOBORDER);
Menu_init(&Menu,4,8,1,9,items,GREEN,BLACK,SINGLELINE);
View_open(&View);
cprintf("hello! ");
View_open(&PaView);
cprintf("Pa doesn't exit!");
View_open(&PbView);
cprintf("Pb doesn't exit!");
}
void main()
{
int id,quit=0;
Init();
do
{
id=Menu_drive(&Menu);
switch(id)
{
case 0:
break;
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
break;
case 5:
break;
case 6:
break;
case 7:
break;
case 8:
quit=1;
break;
}
}while(quit==0);
View_close(&View);
View_close(&PaView);
View_close(&PbView);
Menu_close(&Menu);
}
--
※ 来源:·哈工大紫丁香 bbs.hit.edu.cn·[FROM: 天外飞仙]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:3.727毫秒