problem displaying text.

This is a discussion on problem displaying text. within the Windows Programming forums, part of the Platform Specific Boards category; Hi everyone. As i do with most large projects, i write parts of them just with the console to get ...

  1. #1
    Registered User The15th's Avatar
    Join Date
    Aug 2001
    Posts
    125

    problem displaying text.

    Hi everyone.

    As i do with most large projects, i write parts of them just with the console to get all the code working, and then i convert it to a Win32 app. Anyway to get to my point, i am having a bit of trouble here.

    In the cosole i display my text like

    cout<<cl.eval(expbuf)

    and everything works fine. Now of course in windows i cant go MessageBox(..,cl.eval(expbuf),..,..); and the same with SendMessage(); so i tried using sprintf() to get it into a char buff so i could then use SendMessage() however when i try this my Buffer is always 0 . So now im lost,
    Thank you for any advise.

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    >>> windows i cant go MessageBox(..,cl.eval(expbuf),..,..);

    It depends what type the eval method of your cl class returns of course. If it returns a character pointer, then you could indeed do that. Otherwise, sprintf to a temporary buffer should work. I think you should post a little code which demonstrates your problem.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Reading Text File (spaces problem)
    By kekewong in forum C Programming
    Replies: 1
    Last Post: 04-15-2009, 04:34 PM
  2. Problem Displaying a Struct
    By rockstarpirate in forum C++ Programming
    Replies: 16
    Last Post: 05-05-2008, 10:05 AM
  3. Text string not appearing - RH problem?
    By westm2000 in forum C Programming
    Replies: 1
    Last Post: 10-05-2002, 08:49 PM
  4. Sorting text file problem...
    By John-m in forum C Programming
    Replies: 3
    Last Post: 10-01-2002, 05:51 PM
  5. displaying text with DirectX
    By MechanicX in forum Game Programming
    Replies: 4
    Last Post: 09-24-2001, 07:28 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21