listboxes :D

This is a discussion on listboxes :D within the C Programming forums, part of the General Programming Boards category; hello everybody, is there any easy way to add a whole .txt file to a listbox, or a common way ...

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

    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
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    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 */
    }
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  3. #3
    That weird Java guy xniinja's Avatar
    Join Date
    Jun 2010
    Posts
    230
    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
    230
    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, 03: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, 02:09 PM
  4. Creating/Adding to listboxes
    By punky in forum Windows Programming
    Replies: 4
    Last Post: 03-02-2003, 06:09 PM
  5. Problem with CreateWindowEx() for Listboxes
    By frenchfry164 in forum Windows Programming
    Replies: 3
    Last Post: 01-05-2003, 12:18 PM

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