• Advertisement

Archived

This topic is now archived and is closed to further replies.

I need font help!

This topic is 6523 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
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


Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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


Share this post


Link to post
Share on other sites
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


Share this post


Link to post
Share on other sites
woeps got an URL error each time I tried to post
But I guess it worked anyway

Share this post


Link to post
Share on other sites

  • Advertisement