text file and list box

  • Thread starter Thread starter wayne
  • Start date Start date
W

wayne

hi,

how can i load a text file into a list box, so that when i run th
program, the list box will have a list of items in it?

thank


-
wayn
 
Open file
Read line by line
Insert each line as listbox item
Close file

You can use CStdioFile for opening/reading the text file and
CListBox::AddString to add items into the listbox.
 
Back
Top