QA.TechInterviews.com - your tech questions answered
How To Add Colour And Sound Effects For C++ win32 Console Program?
I'm a beginner to c++ programmer and am doind a samaal assignment. I need to add effects to the program e.g. colour font and different coloured backgrounds. Any help or advice given would be very appreciated.
Example:

≡ File Edit Search Run Compile Debug Project Options Window Help
╔═[■]════════════════════════════════ Help ══════════════════════════════3═[↕]═╗
║ /* loop through the available colors */ ▲
║ for (color=1; color<=maxcolor; color++) ▒
║ { ▒
║ /* clear the screen */ ▒
║ cleardevice(); ▒
║ ▒
║ /* select a new background color */ ▒
║ setcolor(color); ▒
║ ▒
║ /* output a messsage */ ▒
║ sprintf(msg, "Color: %d", color); ▒
║ outtextxy(x, y, msg); ▒
║ getch(); ▒
║ } ■
║ ▒
║ /* clean up */ ▒
║ closegraph(); ▒
║ return 0; ▒
║ } ▒
║ ▒
║ ▼
Example:

≡ File Edit Search Run Compile Debug Project Options Window Help
╔═[■]════════════════════════════════ Help ══════════════════════════════3═[↕]═╗
║ /* loop through the available colors */ ▲
║ for (color=1; color<=maxcolor; color++) ▒
║ { ▒
║ /* clear the screen */ ▒
║ cleardevice(); ▒
║ ▒
║ /* select a new background color */ ▒
║ setcolor(color); ▒
║ ▒
║ /* output a messsage */ ▒
║ sprintf(msg, "Color: %d", color); ▒
║ outtextxy(x, y, msg); ▒
║ getch(); ▒
║ } ■
║ ▒
║ /* clean up */ ▒
║ closegraph(); ▒
║ return 0; ▒
║ } ▒
║ ▒
║ ▼

Back to QA. TechInterviews.com. Powered by Yahoo! Answers and TechInterviews.com community.