outtextxy(int x, int y, char *string) does the trick
I figure you can combine this with the getmaxx() and getmaxy() functions to make it change dynamically. Or you can write your own functions for that.
Here is an example usage:
Code:
#include <graphics.h>
int main()
{
int max_x, max_y;
// initialize your graphics whatever way
max_x = getmaxx();
max_y = getmaxy();
setcolor(BLUE);
settextjustify(CENTER_TEXT, CENTER_TEXT);
settextstyle(SANS_SERIF_FONT, HORIZ_DIR, 5);
outtextxy(max_x/2, max_y/2, "Hello There");
// Close your graphics whatever way
return 0;
}
That should display the text in the middle of the screen.
Good luck