Thread: problem displaying text.

  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,829
    >>> 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, 03:34 PM
  2. Problem Displaying a Struct
    By rockstarpirate in forum C++ Programming
    Replies: 16
    Last Post: 05-05-2008, 09:05 AM
  3. Text string not appearing - RH problem?
    By westm2000 in forum C Programming
    Replies: 1
    Last Post: 10-05-2002, 07:49 PM
  4. Sorting text file problem...
    By John-m in forum C Programming
    Replies: 3
    Last Post: 10-01-2002, 04:51 PM
  5. displaying text with DirectX
    By MechanicX in forum Game Programming
    Replies: 4
    Last Post: 09-24-2001, 06:28 PM