CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: \n

  1. #1
    Join Date
    May 2009
    Posts
    16

    \n

    my mfc dialog listbox does not act upon \n characters. I do not see line breaks.parsing texts seems to be the only solution.i am not sure but i think i use vc2005. i am very new to ms env.

  2. #2
    Join Date
    Apr 2009
    Posts
    57

    Re: \n

    Well it would help if you could explain what you are trying to do in the listbox???

  3. #3
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: \n

    linebreaks in a listbox ?

  4. #4
    Join Date
    May 2009
    Posts
    16

    Re: \n

    a text like: it is rainy day\nit is rainy day. appears as
    "it is rainy day||it is rainy day". instead of
    it is rainy day
    it is rainy day.

  5. #5
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: \n

    You can't put enters in a listbox... you can only insert items in it. Use CListBOx::AddString () to add multiple lines.

  6. #6
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,637

    Re: \n

    Quote Originally Posted by PHE View Post
    a text like: it is rainy day\nit is rainy day. appears as
    "it is rainy day||it is rainy day". instead of
    it is rainy day
    it is rainy day.
    Sounds like you're using the wrong control. List boxes display and allow selection of a "list" of items. They're not designed or intended to display formatted text.

  7. #7
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: \n

    Have a look at Multi-Line ListBox
    Victor Nijegorodov

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured