Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

understanding the color change in AGECA002.ZIP

Status
Not open for further replies.

bob323

MIS
Jan 3, 2001
5
0
0
US
I've been trying to figure out how to change the color of the dos background. I've been looking at a file at:
a number of these files including:
AGECA002.ZIP that is a simple age calculator.
but I still don't quite understand how he did it... can anyone point me right on this one please......
 
He includes some header files [ created by him ] those files have user-defined-functions which are helping programmer to use one [user-defined]function instead of many [c library fuctions].

As he used :
DspMessage(6,9,LT_CYAN,vid.normal_bg,"example..21 9 1966" );

1 > first two values are loction of cursor X & Y
we use gotoxy(int x, int y) function in C for this purpose

2> 3rd is text color value
we use textcolor(int txtcolr) fuction ic C for this purpose

3> 4th is backgroung color[used a structure for valuse]
we used textbackground(int bkgcolor) for this purpose in C

4> last is message to display
we use Cprintf("....") or cputs("...") for this purpose in C

if you don't have practice on UDF's then do it to improve your skills,
A good book for beginner is : programming in C and C++
by: Robert Lafore
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top