|
Pop-up Menu
#include <stdio.h>
#include <bios.h>
#include <dos.h>
char far *vid_mem;
main ( )
{
void printc ( int column_no, int line_no, char print_char, int att);
void printc ( int column_no, int line_no, char *print_string, int att);
void box ( int left_col, int top_lin, int right_col, int bot_lin, int
att);
char far *videtect();
int actors, choice;
char text[40000];
char *menu[] = {"Amitabh", "Aamir", "Rthiwik",
"Shahrukh", "Sanjay", "Salman");
};
choice = actors =0;
vid_mem = videtect();
gettext (35, 10, 48, 18, text);
box (34, 9, 45, 16, 112);
for ( actors=0; actors < 6; actors++ )
{
prints ( 35, actors +10, menu[actors], 7);
}
choice = bar ( 35, 10, 10, 6, 112 );
if ( choice )
printf ( "%s is your Favourite Actor ");
else
printf ( "Don't like any of these Actors ? ");
puttext ( 35, 10, 48, 18, text );
}
|