display an integer as text string

I am trying to output a variable to the screen for testing purposes.

Do I use TextOut()?

I cannot seem to type convert the variable properly to work with this function.

Also, do I do this processing during the WM_PAINT message?

Thanks in advance...
Last edited on
you can use stringstream class or you can sprintf to convert integer to string.

TextOut can be used. Its not necessary where you put the text on the screen as it will be visible untill the windows is hidden, minimized or something overlaps your window. You need to maintain all the stream you write inside the wm_paint. What I mean is, lets say you write "hello world" in wm_create. you need to write this every time wm_paint is called otherwise, "hello world" will be seen only once.
Topic archived. No new replies allowed.