Click here to Skip to main content
15,886,110 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionMethods bank account Pin
Magda63477-Dec-12 10:17
Magda63477-Dec-12 10:17 
AnswerRe: Methods bank account Pin
Richard MacCutchan7-Dec-12 21:56
mveRichard MacCutchan7-Dec-12 21:56 
AnswerRe: Methods bank account Pin
Alan Balkany10-Dec-12 5:43
Alan Balkany10-Dec-12 5:43 
AnswerRe: Methods bank account Pin
PecuniousPete10-Dec-12 8:05
PecuniousPete10-Dec-12 8:05 
GeneralRe: Methods bank account Pin
Magda634713-Mar-13 11:36
Magda634713-Mar-13 11:36 
Questionread text file Pin
peoria1237-Dec-12 9:59
peoria1237-Dec-12 9:59 
AnswerRe: read text file Pin
André Kraak7-Dec-12 20:56
André Kraak7-Dec-12 20:56 
AnswerRe: read text file Pin
Sajeesh Payolam9-Dec-12 21:05
Sajeesh Payolam9-Dec-12 21:05 
I think first you should add a button in dialog and on handle of this button write the code below
C++
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? Pin
Vaclav_7-Dec-12 4:10
Vaclav_7-Dec-12 4:10 
AnswerRe: WM_DEVICECHANGE sets wParam to unexpected value of 7 - how to troubleshoot this? Pin
Jochen Arndt7-Dec-12 5:56
professionalJochen Arndt7-Dec-12 5:56 
AnswerRe: WM_DEVICECHANGE sets wParam to unexpected value of 7 - how to troubleshoot this? Pin
jeron17-Dec-12 5:59
jeron17-Dec-12 5:59 
GeneralRe: WM_DEVICECHANGE sets wParam to unexpected value of 7 - how to troubleshoot this? Pin
Vaclav_7-Dec-12 6:58
Vaclav_7-Dec-12 6:58 
AnswerRe: WM_DEVICECHANGE sets wParam to unexpected value of 7 - how to troubleshoot this? Pin
Richard MacCutchan7-Dec-12 21:51
mveRichard MacCutchan7-Dec-12 21:51 
GeneralRe: WM_DEVICECHANGE sets wParam to unexpected value of 7 - how to troubleshoot this? Pin
Vaclav_9-Dec-12 5:47
Vaclav_9-Dec-12 5:47 
AnswerRe: WM_DEVICECHANGE sets wParam to unexpected value of 7 - how to troubleshoot this? Pin
PecuniousPete9-Dec-12 20:23
PecuniousPete9-Dec-12 20:23 
Questionhow to find out the codes who eat up my memory? Pin
Falconapollo7-Dec-12 2:32
Falconapollo7-Dec-12 2:32 
AnswerRe: how to find out the codes who eat up my memory? Pin
Richard MacCutchan7-Dec-12 2:54
mveRichard MacCutchan7-Dec-12 2:54 
QuestionRe: how to find out the codes who eat up my memory? Pin
David Crow7-Dec-12 2:55
David Crow7-Dec-12 2:55 
AnswerRe: how to find out the codes who eat up my memory? Pin
Falconapollo7-Dec-12 3:11
Falconapollo7-Dec-12 3:11 
QuestionRe: how to find out the codes who eat up my memory? Pin
David Crow7-Dec-12 3:25
David Crow7-Dec-12 3:25 
AnswerRe: how to find out the codes who eat up my memory? Pin
Falconapollo7-Dec-12 3:28
Falconapollo7-Dec-12 3:28 
AnswerRe: how to find out the codes who eat up my memory? Pin
Joe Woodbury7-Dec-12 8:30
professionalJoe Woodbury7-Dec-12 8:30 
AnswerRe: how to find out the codes who eat up my memory? Pin
vr9999999998-Dec-12 1:25
vr9999999998-Dec-12 1:25 
AnswerRe: how to find out the codes who eat up my memory? Pin
PecuniousPete11-Dec-12 20:42
PecuniousPete11-Dec-12 20:42 
QuestionImage processing and converter Pin
_Flaviu6-Dec-12 22:12
_Flaviu6-Dec-12 22:12 

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.