Sign in to follow this  

print variables with drawtext

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

If you notice, the basic text-drawing functions involve strings, which are text.
Convert your variables to strings in order to draw them.
[If that isn't the answer, then please elaborate]

Share this post


Link to post
Share on other sites
Include the windows header file into your app and use wsprintf like this:

int score = 8;
char text[32];
wsprintf(text,"The Score Is %d",score);

Then when your printing the text using DrawText() put text as the first parameter.

Hope that helped and good luck.

Share this post


Link to post
Share on other sites

This topic is 4264 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this