Thread: listboxes :D

  1. #1
    That weird Java guy xniinja's Avatar
    Join Date
    Jun 2010
    Posts
    231

    listboxes :D

    hello everybody, is there any easy way to add a whole .txt file to a listbox, or a common way that most people do it.
    your help is much appreciated

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    Quote Originally Posted by xniinja View Post
    hello everybody, is there any easy way to add a whole .txt file to a listbox, or a common way that most people do it.
    your help is much appreciated
    Code:
    /* open file here */
    while(fgets(buffer, sizeof buffer, f))
    {
       /* strip /n from buffer here */
       /* add line to listbox here */
    }
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  3. #3
    That weird Java guy xniinja's Avatar
    Join Date
    Jun 2010
    Posts
    231
    but how do I tell the program to go to the next line, wont it just read the same line over and over

  4. #4
    That weird Java guy xniinja's Avatar
    Join Date
    Jun 2010
    Posts
    231
    never mind it worked, thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. retrieving data from listboxes
    By luddeb in forum Windows Programming
    Replies: 6
    Last Post: 01-10-2006, 04:08 AM
  2. Listboxes
    By Zionaster in forum C++ Programming
    Replies: 3
    Last Post: 04-15-2003, 08:17 PM
  3. ListBoxes with MFC
    By omeydhomey in forum C++ Programming
    Replies: 1
    Last Post: 03-25-2003, 03:09 PM
  4. Creating/Adding to listboxes
    By punky in forum Windows Programming
    Replies: 4
    Last Post: 03-02-2003, 07:09 PM
  5. Problem with CreateWindowEx() for Listboxes
    By frenchfry164 in forum Windows Programming
    Replies: 3
    Last Post: 01-05-2003, 01:18 PM