9 Replies - 6977 Views - Last Post: 17 July 2011 - 10:21 AM Rate Topic: -----

#1 Jozhogg  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 11-June 11

How to draw text to a win32 application?

Posted 17 July 2011 - 08:14 AM

I've recently written a program and would like to improve it by showing some variables on screen so the user can see what's happening in terms of numbers. I've looked around the internet but there hasn't been anything that's striked me as a specific method just for writing things in an application window.

Any help?
Is This A Good Question/Topic? 0
  • +

Replies To: How to draw text to a win32 application?

#2 newn  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 119
  • Joined: 22-April 09

Re: How to draw text to a win32 application?

Posted 17 July 2011 - 08:17 AM

Did you need something like that? Link
That's my first Google hit for "win32 draw text" search term.
Not really sure what you need from what you've wrong, though it sounds like you're looking for something else and much more informative. Homework?
Was This Post Helpful? 0
  • +
  • -

#3 Jozhogg  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 11-June 11

Re: How to draw text to a win32 application?

Posted 17 July 2011 - 08:25 AM

Not homework, I'm just interested in this kind of thing. I'm still relatively new to it though, I'm not sure how the code in that link would actually send the text though...?

Don't worry, sorted now :)
Was This Post Helpful? 0
  • +
  • -

#4 n8wxs  Icon User is offline

  • --... ...-- -.. . -. ---.. .-- -..- ...
  • member icon

Reputation: 972
  • View blog
  • Posts: 3,878
  • Joined: 07-January 08

Re: How to draw text to a win32 application?

Posted 17 July 2011 - 08:29 AM

Try it and find out.
Was This Post Helpful? 0
  • +
  • -

#5 newn  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 119
  • Joined: 22-April 09

Re: How to draw text to a win32 application?

Posted 17 July 2011 - 08:40 AM

View PostJozhogg, on 17 July 2011 - 06:25 PM, said:

Not homework, I'm just interested in this kind of thing. I'm still relatively new to it though, I'm not sure how the code in that link would actually send the text though...?

Don't worry, sorted now :)

Strange question as for somebody who is just interested in it, especially after stating that you need it to improve your program.
Anyway, you should Google before asking such questions, in case you do need this for something that you are doing because you want to do it.
Good to hear that you sorted it out.
Was This Post Helpful? 0
  • +
  • -

#6 Jozhogg  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 11-June 11

Re: How to draw text to a win32 application?

Posted 17 July 2011 - 08:44 AM

By the sounds of things you get a lot of people asking you to do homework projects...? :P
Was This Post Helpful? 0
  • +
  • -

#7 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6063
  • View blog
  • Posts: 23,515
  • Joined: 23-August 08

Re: How to draw text to a win32 application?

Posted 17 July 2011 - 08:53 AM

theForger's Win32 API Tutorial
Text and Fonts
Was This Post Helpful? 1
  • +
  • -

#8 #define  Icon User is offline

  • Duke of Err
  • member icon

Reputation: 1343
  • View blog
  • Posts: 4,606
  • Joined: 19-February 09

Re: How to draw text to a win32 application?

Posted 17 July 2011 - 09:29 AM

You could use Edit Controls.

theForger's Win32, Standard Controls

There is SetDlgItemText() and sprintf(), or SetDlgItemInt() to write the values.
Was This Post Helpful? 0
  • +
  • -

#9 newn  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 119
  • Joined: 22-April 09

Re: How to draw text to a win32 application?

Posted 17 July 2011 - 09:56 AM

View PostJackOfAllTrades, on 17 July 2011 - 06:53 PM, said:


Nice, I've been looking for this after reading this topic. Somehow it wasn't in my bookmarks... Re-added, thanks!
Was This Post Helpful? 0
  • +
  • -

#10 Aphex19  Icon User is offline

  • Born again Pastafarian.
  • member icon

Reputation: 615
  • View blog
  • Posts: 1,873
  • Joined: 02-August 09

Re: How to draw text to a win32 application?

Posted 17 July 2011 - 10:21 AM

In my tutorial, here, take a look at the CreateControls function. There's some code there that draws text using a static control as well as some code which changes the font.

This post has been edited by Aphex19: 17 July 2011 - 10:21 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1