-
Notifications
You must be signed in to change notification settings - Fork 2
/
Design.h
36 lines (33 loc) · 970 Bytes
/
Design.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
void SetColor(int ForgC)
{
WORD wColor;
HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_SCREEN_BUFFER_INFO csbi;
//We use csbi for the wAttributes word.
if(GetConsoleScreenBufferInfo(hStdOut, &csbi))
{
//Mask out all but the background attribute, and add in the forgournd color
wColor = (csbi.wAttributes & 0xF0) + (ForgC & 0x0F);
SetConsoleTextAttribute(hStdOut, wColor);
}
return;
}
void header()
{
system("@cls||clear");
printf("\n\n\n***************************************************\n\n");
SetColor(3);
printf("\tWelcome To Railway Reservation System");
SetColor(7);
printf("\n\n***************************************************\n\n");
return ;
}
void footer()
{
printf("\n\n***************************************************\n\n");
SetColor(3);
printf("\tThank you. Please visit agian.");
SetColor(7);
printf("\n\n***************************************************\n");
return ;
}