S
sugaray
hey, i'm having this problem when i'm trying to implement menu
capability in my program, using direction key UP and DOWN to move the
a bar between the menu items, press enter to select it, cudgle my
brain hardly as possibly could I just couldn't figure out how to do
this. and i'm using Visual C++ and I don't know if there's any library
functions to handle text attributes like in Borland C (textcolor()
etc.). so hope some could help me out, thanx in advance.
int scan,extended;
printf("1. log on system\n");
printf("2. log out system\n");
printf("3. inquire record\n");
printf("4. record statistics\n");
printf("5. exit system\n");
while((scan=getch())==0 || scan==0xe0) {
extended=getch();
switch(extended) {
case 0x48:
keyup();
break;
case 0x50:
keydown();
break;
default:
oops();
}
Gary.
capability in my program, using direction key UP and DOWN to move the
a bar between the menu items, press enter to select it, cudgle my
brain hardly as possibly could I just couldn't figure out how to do
this. and i'm using Visual C++ and I don't know if there's any library
functions to handle text attributes like in Borland C (textcolor()
etc.). so hope some could help me out, thanx in advance.
int scan,extended;
printf("1. log on system\n");
printf("2. log out system\n");
printf("3. inquire record\n");
printf("4. record statistics\n");
printf("5. exit system\n");
while((scan=getch())==0 || scan==0xe0) {
extended=getch();
switch(extended) {
case 0x48:
keyup();
break;
case 0x50:
keydown();
break;
default:
oops();
}
Gary.