Click here to Skip to main content
       

C / C++ / MFC

 
QuestionMethods bank account PinmemberMagda63477-Dec-12 11:17 
AnswerRe: Methods bank account PinmvpRichard MacCutchan7-Dec-12 22:56 
AnswerRe: Methods bank account PinmemberAlan Balkany10-Dec-12 6:43 
AnswerRe: Methods bank account PinmemberPecuniousPete10-Dec-12 9:05 
GeneralRe: Methods bank account PinmemberMagda634713-Mar-13 12:36 
Questionread text file Pinmemberpeoria1237-Dec-12 10:59 
AnswerRe: read text file PinmemberAndré Kraak7-Dec-12 21:56 
AnswerRe: read text file Pinmembersajeesh.c9-Dec-12 22:05 
I think first you should add a button in dialog and on handle of this button write the code below
void CReadFileDlg::OnReadFile() 
{
    CEdit* m_EditArray[10];
    CStringArray FileArray;
    char cTemp[256];
    ifstream fin;
    fin.open( _T("C:\\FileRead.txt"), ios::in|ios::nocreate );
    while( !fin.eof() )
    {
        // The getline function is used to read an entire line
        fin.getline( cTemp, 256, '\n' );
        CString csChartoString;
        csChartoString.Format( "%s", cTemp );
        if( csChartoString != "" )
        {
            FileArray.Add( csChartoString );
        }
     }
    int top = 10;
    int bottom = 30;
    for(int i = 0; i < 10; i++)
    {
        m_EditArray[i] = new CEdit;
        DWORD dwStyle = WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON;
        m_EditArray[i]->Create(dwStyle, CRect(10,top,100,bottom), this,100+i);
        m_EditArray[i]->ShowWindow(TRUE);
        top += 30;
        bottom += 30;
    }
    int nArraySize = FileArray.GetSize();
    int nPos = 0;
    for( int nIdx= 0; nIdx < nArraySize; ++nIdx )
    {
        m_EditArray[nIdx]->SetWindowText( FileArray.GetAt( nIdx ));
    }
}

QuestionWM_DEVICECHANGE sets wParam to unexpected value of 7 - how to troubleshoot this? PinmemberVaclav_Sal7-Dec-12 5:10 
AnswerRe: WM_DEVICECHANGE sets wParam to unexpected value of 7 - how to troubleshoot this? PinmemberJochen Arndt7-Dec-12 6:56 
AnswerRe: WM_DEVICECHANGE sets wParam to unexpected value of 7 - how to troubleshoot this? Pinmemberjeron17-Dec-12 6:59 
GeneralRe: WM_DEVICECHANGE sets wParam to unexpected value of 7 - how to troubleshoot this? PinmemberVaclav_Sal7-Dec-12 7:58 
AnswerRe: WM_DEVICECHANGE sets wParam to unexpected value of 7 - how to troubleshoot this? PinmvpRichard MacCutchan7-Dec-12 22:51 
GeneralRe: WM_DEVICECHANGE sets wParam to unexpected value of 7 - how to troubleshoot this? PinmemberVaclav_Sal9-Dec-12 6:47 
AnswerRe: WM_DEVICECHANGE sets wParam to unexpected value of 7 - how to troubleshoot this? PinmemberPecuniousPete9-Dec-12 21:23 
Questionhow to find out the codes who eat up my memory? PinmemberFalconapollo7-Dec-12 3:32 
AnswerRe: how to find out the codes who eat up my memory? PinmvpRichard MacCutchan7-Dec-12 3:54 
QuestionRe: how to find out the codes who eat up my memory? PinmemberDavidCrow7-Dec-12 3:55 
AnswerRe: how to find out the codes who eat up my memory? PinmemberFalconapollo7-Dec-12 4:11 
QuestionRe: how to find out the codes who eat up my memory? PinmemberDavidCrow7-Dec-12 4:25 
AnswerRe: how to find out the codes who eat up my memory? PinmemberFalconapollo7-Dec-12 4:28 
AnswerRe: how to find out the codes who eat up my memory? PinmemberJoe Woodbury7-Dec-12 9:30 
AnswerRe: how to find out the codes who eat up my memory? Pinmembervr9999999998-Dec-12 2:25 
AnswerRe: how to find out the codes who eat up my memory? PinmemberPecuniousPete11-Dec-12 21:42 
QuestionImage processing and converter PinmemberFlaviu26-Dec-12 23:12 

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

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


Advertise | Privacy | Mobile
Web04 | 2.8.141223.1 | Last Updated 26 Dec 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid