Thread: Displaying text in a window

  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    204

    Displaying text in a window

    I'm using the code posted on this web page http://www.winprog.org/tutorial/simple_window.html

    The code just creates a simple window. What I would like to do is display text on this window. Ideally it would be displayed in a form similar to an HTML table.

    Does anyone know how I can do this with out spending many hours reading?

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    >>Does anyone know how I can do this with out spending many hours reading?<<

    No, although that depends on how quicky you read and assimilate information.

    >>Ideally it would be displayed in a form similar to an HTML table.<<

    A listview control is a possible option. Search this board for examples of their use.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    Registered User
    Join Date
    Aug 2005
    Posts
    204
    Quote Originally Posted by Ken Fitlike
    >>Does anyone know how I can do this with out spending many hours reading?<<

    No, although that depends on how quicky you read and assimilate information.
    .
    How about just printing text on a window?

  4. #4
    Registered User
    Join Date
    May 2006
    Posts
    903
    Handle the WM_PAINT message and call BeginPaint(), DrawText() and EndPaint().

  5. #5
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    >>How about just printing text on a window?<<

    If all you need is a one-off, then go with Desolation's helpful suggestion (TextOut may be of interest, too, in this respect). If you want something with more flexibility and wider applicability then use an existing windows control, such as a listview.

    If you have the time and inclination, you could always try both and see which you find more suitable for whatever it is you're trying to achieve.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Pong is completed!!!
    By Shamino in forum Game Programming
    Replies: 11
    Last Post: 05-26-2005, 10:50 AM
  2. opengl help
    By heat511 in forum Game Programming
    Replies: 4
    Last Post: 04-05-2004, 01:08 AM
  3. Problem with creating new window, from another window
    By Garfield in forum Windows Programming
    Replies: 6
    Last Post: 01-11-2004, 02:10 PM
  4. Window 1 causing text on window 2
    By Thantos in forum Windows Programming
    Replies: 4
    Last Post: 08-17-2003, 11:29 PM
  5. displaying text in a MFC AppWizard window
    By that guy in forum Windows Programming
    Replies: 5
    Last Post: 07-23-2002, 11:40 AM