Click here to Skip to main content
15,915,501 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralMDI problem or Memory problem Pin
Benjamintee18-Aug-03 15:44
Benjamintee18-Aug-03 15:44 
GeneralRe: MDI problem or Memory problem Pin
John M. Drescher18-Aug-03 16:37
John M. Drescher18-Aug-03 16:37 
GeneralRe: MDI problem or Memory problem Pin
Anonymous19-Aug-03 21:11
Anonymous19-Aug-03 21:11 
GeneralSetting Focus from Login dialog to other dialog Pin
dk_sn1p3r18-Aug-03 13:34
dk_sn1p3r18-Aug-03 13:34 
GeneralRe: Setting Focus from Login dialog to other dialog Pin
valikac18-Aug-03 17:54
valikac18-Aug-03 17:54 
GeneralRe: Setting Focus from Login dialog to other dialog Pin
dk_sn1p3r21-Aug-03 10:53
dk_sn1p3r21-Aug-03 10:53 
GeneralRe: Setting Focus from Login dialog to other dialog Pin
valikac21-Aug-03 17:43
valikac21-Aug-03 17:43 
GeneralParsing Tabulted Text Files Pin
afj66618-Aug-03 13:29
afj66618-Aug-03 13:29 
Hi there.

I'm trying to make program that can read a tabulated text file and show that in a grid. I got it to work but I'm not satisfied with the speed of it.
CString Text;
string buf;
ifstream file(FilePath);
BOOL bLineEnd = true;
int i = 0, nRowCount = 1, nColCount = 0;
m_pGrid->SetColumnCount(0);
m_pGrid->SetRowCount(0);
m_pGrid->SetRedraw(FALSE);

getline(file, buf, '\n');
while(!file.eof())
{
    m_pGrid->SetRowCount(nRowCount+1);
    while(bLineEnd)
    {
        bLineEnd = AfxExtractSubString(Text, buf.begin(), i, '\t');
        if(bLineEnd)
        {
            if(nColCount <= i+1) m_pGrid->SetColumnCount((nColCount = i+1)+1);
            m_pGrid->SetItemText(nRowCount, i+1, Text);

        }
        i++;
    }
    i=0;
    bLineEnd = true;
    nRowCount++;
    getline(file, buf, '\n');
}
m_pGrid->SetRedraw(TRUE);

I'm using Chris Maunder's MFC Grid Control to do this.
I hope that someone have a faster way to do this.
GeneralRe: Parsing Tabulted Text Files Pin
Steve S18-Aug-03 22:17
Steve S18-Aug-03 22:17 
GeneralHelp with templates (newbie) Pin
Anonymous18-Aug-03 12:57
Anonymous18-Aug-03 12:57 
GeneralRe: Help with templates (newbie) Pin
Christian Graus18-Aug-03 13:23
protectorChristian Graus18-Aug-03 13:23 
GeneralRe: Help with templates (newbie) Pin
Jay Hova18-Aug-03 16:03
Jay Hova18-Aug-03 16:03 
GeneralRe: Help with templates (newbie) Pin
Christian Graus18-Aug-03 17:03
protectorChristian Graus18-Aug-03 17:03 
GeneralRe: Help with templates (newbie) Pin
Christian Graus18-Aug-03 13:26
protectorChristian Graus18-Aug-03 13:26 
GeneralRe: Help with templates (newbie) Pin
Michael Dunn18-Aug-03 14:11
sitebuilderMichael Dunn18-Aug-03 14:11 
GeneralRe: Help with templates (newbie) Pin
Nemanja Trifunovic18-Aug-03 18:54
Nemanja Trifunovic18-Aug-03 18:54 
GeneralRe: Help with templates (newbie) Pin
Hosam Aly Mahmoud18-Aug-03 21:39
Hosam Aly Mahmoud18-Aug-03 21:39 
GeneralRe: Help with templates (newbie) Pin
Michael Dunn19-Aug-03 6:50
sitebuilderMichael Dunn19-Aug-03 6:50 
GeneralRe: Help with templates (newbie) Pin
Hosam Aly Mahmoud19-Aug-03 7:41
Hosam Aly Mahmoud19-Aug-03 7:41 
GeneralHelp with templates Pin
Anonymous18-Aug-03 12:56
Anonymous18-Aug-03 12:56 
GeneralRe: Help with templates Pin
Abebe18-Aug-03 20:55
Abebe18-Aug-03 20:55 
GeneralAdded a new file to a Project. (Program won't compile afterwards.) Pin
WREY18-Aug-03 12:52
WREY18-Aug-03 12:52 
GeneralRe: Added a new file to a Project. (Program won't compile afterwards.) Pin
Iain Clarke, Warrior Programmer18-Aug-03 23:16
Iain Clarke, Warrior Programmer18-Aug-03 23:16 
GeneralRe: Added a new file to a Project. (Program won't compile afterwards.) Pin
WREY19-Aug-03 0:06
WREY19-Aug-03 0:06 
GeneralRe: Added a new file to a Project. (Program won't compile afterwards.) Pin
Iain Clarke, Warrior Programmer19-Aug-03 0:13
Iain Clarke, Warrior Programmer19-Aug-03 0:13 

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.