Jump to content
  • Advertisement

Archived

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

Squall012

I need font help!

This topic is 6616 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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!