Ok, this should be a simple one (which is why I am clueless).
I have a .csv file with 700+ rows each containing 23 columns of text. All I need to do is referrence the file by specifying which row I want, pulling the entire row of 23 columns and outputting it to a MessageBox with each column...
Ok, this should be a simple one (which is why I am clueless).
I have a .csv file with 700+ rows each containing 23 columns of text. All I need to do is referrence the file by specifying which row I want, pulling the entire row of 23 columns and outputting it to a MessageBox with each column...
Thanks dcompto! That did in fact work nicely. I need to see if I can mass-produce that effect for all of these text files, but if nothing else I now know it can be done.
Skip.. Do you mean assuming I have less than 256 columns??
As I stated in my original post, 20 lines per .txt file. That equates to 20 columns per row. I'm pretty sure the amount of rows I can have are nigh endless.
CorBlimey.. That would be the simplest way to go, and one I may yet have to...
Is there a way to import an msdos .txt file so that each line of text gets imported into a separate column within the same row?
For example: A .txt file with 20 lines of text all separated by carriage returns.. Imported into a single row within a spreadsheet, one line per column.
Any help...
I've started a new thread for this problem since my other post has died out with no resolution.
All I am looking to do is have my Edit Box automatically scroll down when the box fills with text and new text appearing goes off the screen. Some sample code illustrating this working would be great.
Ok, I now have a control variable assigned to the Edit Box in question: m_EDIT2a
It seems like I should be able to:
m_EDIT2a.LineScroll(1);
or
m_EDIT2a.SetWindowText->LineScroll(1);
Maybe I'm way off base here..
I guess I'm just not getting it..
The only place in my code that has class CWhatever: public CDialog is the CAboutDlg area.
I have a Vertical Scrollbar on my Edit Box window that was added via the Edit Box Properties under Styles. The ID for that Edit Box is IDC_EDIT2 and I've tried using...
That makes sense. I've tried adding it in near the beginning in several spots, but get a compile error each time. I'm too new to VC++ to know where it should go.
I've done my homework and found numerous references to the following code being as close to random as VC++ gets:
srand((unsigned)time(NULL));
d100 = 1 + rand()%100;
However, if you run this repeated with no pause you get a steadily increasing "random" value until it crests 100 and starts over...
Thanks for the reply. You're right in that it needed the identifier:
Cedit::LineScroll;
gives no compiler error, but also gives no line scroll. If I add:
Cedit::LineScroll(1);
or
Cedit::LineScroll();
It gives an error of: illegal call of non-static member function.
I have found numerous references to using the LineScroll(1); command in VC++ to scroll down one line in an Edit Box window. However, when I add it to my own MFC App, it gets a compile error of it being an Undeclared Identifier. So, it obviously doesn't even recognize the command. In the samples...
Sorry.. It was 3am when I wrote that last reply. Turns out what was killing it was using m_EDIT1 = m_EDIT2 + CRLF + m_EDIT1 and then writing m_EDIT1 back out to the screen. Once I created a new CString m_EDIT3 and used it to append the two Edit boxes it worked out fine. Sorry to be a pain.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.