Click here to Skip to main content
15,916,842 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CAsyncSocket-debug assertion failed Pin
Remus Lazar16-Aug-00 2:27
Remus Lazar16-Aug-00 2:27 
GeneralCAsyncSocket-debug assertion failed Pin
Alex Alexapolsky15-Aug-00 22:11
sussAlex Alexapolsky15-Aug-00 22:11 
QuestionHow to register my program into the startup Pin
koteswara15-Aug-00 18:38
koteswara15-Aug-00 18:38 
AnswerRe: How to register my program into the startup Pin
Remus Lazar16-Aug-00 2:56
Remus Lazar16-Aug-00 2:56 
GeneralAddItem-method for MSHFlexGrid 6.0 Pin
Stefan Alpers15-Aug-00 5:10
sussStefan Alpers15-Aug-00 5:10 
GeneralRe: AddItem-method for MSHFlexGrid 6.0 Pin
Remus Lazar16-Aug-00 2:51
Remus Lazar16-Aug-00 2:51 
GeneralLoading a list from file into a List Box Pin
SmokingRope2214-Aug-00 14:53
SmokingRope2214-Aug-00 14:53 
GeneralRe: Loading a list from file into a List Box Pin
Philip Nicoletti15-Aug-00 3:24
Philip Nicoletti15-Aug-00 3:24 
I also have struggled with C++ I/O .... but this should
do the trick :


1) at the top of your cpp file, add the following lines :

#include "fstream.h"               // for file i/o
#define MAX_CHARS_PER_LINE 80      // maximum number of characters
                                   //   per line in your input file


2) create a CONTROL variable for your list box (m_list1 in this example)


3) to read the input file and add to the list box :

char line[MAX_CHARS_PER_LINE];

ifstream infile;
infile.open("list.txt");

while (!infile.eof())
{
   infile.getline(line,MAX_CHARS_PER_LINE);
   m_list1.AddString(line);
}

infile.close();

GeneralRe: Loading a list from file into a List Box Pin
SmokingRope2215-Aug-00 17:06
SmokingRope2215-Aug-00 17:06 
GeneralMultiple doc templates problem Pin
Christian Graus14-Aug-00 9:20
protectorChristian Graus14-Aug-00 9:20 
GeneralRe: Multiple doc templates problem Pin
Mike Dunn14-Aug-00 20:40
Mike Dunn14-Aug-00 20:40 
GeneralRe: Check Visual C++ 4 HOW-TO Pin
Masaaki Onishi16-Aug-00 4:43
Masaaki Onishi16-Aug-00 4:43 
GeneralParsing a file Pin
mukesh.gupta@promap.co.uk14-Aug-00 4:23
mukesh.gupta@promap.co.uk14-Aug-00 4:23 
GeneralRe: Parsing a file Pin
Pete Bassett15-Aug-00 23:27
Pete Bassett15-Aug-00 23:27 
Generaldisable resize Pin
Guy13-Aug-00 14:19
Guy13-Aug-00 14:19 
GeneralRe: disable resize Pin
Remus Lazar14-Aug-00 3:16
Remus Lazar14-Aug-00 3:16 
GeneralRe: disable resize Pin
Guy14-Aug-00 8:30
Guy14-Aug-00 8:30 
GeneralRe: disable resize Pin
Mike Dunn14-Aug-00 7:34
Mike Dunn14-Aug-00 7:34 
Generalthank you Remus and Mike Pin
Guy15-Aug-00 5:08
Guy15-Aug-00 5:08 
GeneralGetting Mouse clicks Pin
Member 442613-Aug-00 7:02
Member 442613-Aug-00 7:02 
GeneralRe: Getting Mouse clicks Pin
Paolo Messina13-Aug-00 10:25
professionalPaolo Messina13-Aug-00 10:25 
GeneralReading TEXT files Pin
Steve Lai13-Aug-00 6:41
Steve Lai13-Aug-00 6:41 
GeneralRe: Reading TEXT files Pin
wanderley16-Aug-00 15:15
wanderley16-Aug-00 15:15 
GeneralI need .ICO and .ICL specs! Pin
Eto12-Aug-00 21:38
Eto12-Aug-00 21:38 
QuestionCan I add icons to the systray Pin
Leon Su12-Aug-00 15:50
sussLeon Su12-Aug-00 15:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.