I've never used visual c++ before but am trying something I hope will be easy for someone to help me with. I've used some basic c stuff in the past on unix and dos.
I have vis c++ 6, i added a mfc app exe, i have a form with an edit box on it, and I called it IDC_currec.
There is an ok button on the form.
On the buttonok event, I've got something like this (real simple).
void CBatchLDlg::OnOK()
{
FILE *fpin;
char buff[5000];
fpin = fopen("c:\\temp\\input-file.txt", "r");
while (fgets(buff,5000,fpin)!=NULL){
strcpy(IDC_currec.text,buff);
}
fclose(fpin);
CDialog::OnOK();
}
How do I get the data from each row in this file (buff) to be displayed on the form in the edit box called IDC_currec???
I'd appreciate a heads up.
Sorry if this is all wrong, but I'm just guessing. I've had no training or prior experience with VC. I've used Vis Basic 6 a bit, and can do this SO easy but I really want to start using C++ for various reasons which I won't go into right now.
In
VB it would be something like IDC_currect.text = whatever but this is not working. This example shown is the last thing I tried.
Thanks,
Kenneth