Advertisement

I need font help!

Started by April 14, 2000 07:46 AM
3 comments, last by Squall012 24 years, 8 months ago
I have asked this before, many many a time. If there is anyone out there who can kindly help me on either making a font engine to let me display numbers, or a way to either use GDI or some other function, please do not hold back. I am at a standstill for the moment, and Ineed this help. Thanks in advance! I need to learn how to display int variables.....hope someone can help!
HFONT fnt;
fnt = CreateFont(40,0,0,0,0,0,0,0,0,0,0,0,0, "Arial");
HDC dc;
backsurf->GetDC(&dc);
SetBkMode(dc, TRANSPARENT);
SelectObject(dc, fnt);
SetTextColor(dc, RGB(255,255,255));

char buffer[200];
int u=10;
int m= 15;
int s= 666;
int length= sprintf( buffer , "%dh:%dm:%ds", u,m,s );
TextOut(dc, 400, 150+l*40, buffer, length);

backsurf->ReleaseDC(dc);

///////////////////////////////////////
Hope this helps


Advertisement
HFONT fnt;
fnt = CreateFont(40,0,0,0,0,0,0,0,0,0,0,0,0, "Arial");
HDC dc;
backsurf->GetDC(&dc);
SetBkMode(dc, TRANSPARENT);
SelectObject(dc, fnt);
SetTextColor(dc, RGB(255,255,255));

char buffer[200];
int u=10;
int m= 15;
int s= 666;
int length= sprintf( buffer , "%dh:%dm:%ds", u,m,s );
TextOut(dc, 400, 150+l*40, buffer, length);

backsurf->ReleaseDC(dc);

///////////////////////////////////////
Hope this helps


HFONT fnt;
fnt = CreateFont(40,0,0,0,0,0,0,0,0,0,0,0,0, "Arial");
HDC dc;
backsurf->GetDC(&dc);
SetBkMode(dc, TRANSPARENT);
SelectObject(dc, fnt);
SetTextColor(dc, RGB(255,255,255));

char buffer[200];
int u=10;
int m= 15;
int s= 666;
int length= sprintf( buffer , "%dh:%dm:%ds", u,m,s );
TextOut(dc, 400, 150+l*40, buffer, length);

backsurf->ReleaseDC(dc);

///////////////////////////////////////
Hope this helps


woeps got an URL error each time I tried to post
But I guess it worked anyway

This topic is closed to new replies.

Advertisement