OK. Thanks for the help and the time you spent.
I'll check it out.
The link was really helpful.
I 'fixed' even more my code(just for fun)
Code:
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<windows.h>
int main()
{ HANDLE h = GetStdHandle ( STD_OUTPUT_HANDLE );
WORD wOldColorAttrs;
CONSOLE_SCREEN_BUFFER_INFO csbiInfo;
/*
* First save the current color information
*/
GetConsoleScreenBufferInfo(h, &csbiInfo);
wOldColorAttrs = csbiInfo.wAttributes;
SetConsoleTextAttribute ( h, FOREGROUND_GREEN | FOREGROUND_INTENSITY );
char ch;
ch=getch();
while(1)
{
if(ch=='a'){
printf("\n\n\n\n\n\n\n\n\n\tTHANKS");
SetConsoleTextAttribute ( h, FOREGROUND_BLUE | FOREGROUND_INTENSITY );}
else if(ch=='d')
{
printf("\n\n\n\n\n\n\n\n\n\t\t\t\t\t\t\tFOR");
SetConsoleTextAttribute ( h, FOREGROUND_RED | FOREGROUND_INTENSITY );}
else if(ch=='w')
{
printf("\t\t\t\tTHE");
SetConsoleTextAttribute ( h, FOREGROUND_GREEN | FOREGROUND_INTENSITY );}
else if(ch=='s'){
printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t HELP!!!");
SetConsoleTextAttribute ( h, FOREGROUND_RED | FOREGROUND_BLUE );}
ch=getch();
if(ch=='a' || ch=='d' || ch=='w' || ch=='s')
system("cls");
}
SetConsoleTextAttribute ( h, wOldColorAttrs);
getchar();
return 0;
}
Copy paste it and try pressing a,d,w,s.....