Click here to Skip to main content
15,917,642 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCompiling error from stdafx.h [modified] Pin
transoft15-May-09 10:18
transoft15-May-09 10:18 
AnswerRe: Compiling error from stdafx.h Pin
Stuart Dootson15-May-09 13:01
professionalStuart Dootson15-May-09 13:01 
GeneralRe: Compiling error from stdafx.h Pin
transoft16-May-09 3:15
transoft16-May-09 3:15 
QuestionPassing multidimensional arrays to functions Pin
Royce Fickling15-May-09 9:45
Royce Fickling15-May-09 9:45 
AnswerRe: Passing multidimensional arrays to functions Pin
led mike15-May-09 10:19
led mike15-May-09 10:19 
QuestionRe: Passing multidimensional arrays to functions Pin
David Crow15-May-09 10:23
David Crow15-May-09 10:23 
QuestionWide char vs. ANSI char Pin
transoft15-May-09 7:32
transoft15-May-09 7:32 
AnswerRe: Wide char vs. ANSI char Pin
CPallini15-May-09 7:49
mveCPallini15-May-09 7:49 
AnswerRe: Wide char vs. ANSI char Pin
Rajesh R Subramanian16-May-09 0:20
professionalRajesh R Subramanian16-May-09 0:20 
GeneralRe: Wide char vs. ANSI char Pin
Joe Woodbury16-May-09 17:55
professionalJoe Woodbury16-May-09 17:55 
GeneralRe: Wide char vs. ANSI char [modified] Pin
Rajesh R Subramanian16-May-09 19:17
professionalRajesh R Subramanian16-May-09 19:17 
QuestionCurious COM question - the case of the second exe server... Pin
Jim Crafton15-May-09 5:51
Jim Crafton15-May-09 5:51 
AnswerRe: Curious COM question - the case of the second exe server... Pin
Nemanja Trifunovic15-May-09 7:37
Nemanja Trifunovic15-May-09 7:37 
GeneralRe: Curious COM question - the case of the second exe server... Pin
CPallini15-May-09 7:49
mveCPallini15-May-09 7:49 
GeneralRe: Curious COM question - the case of the second exe server... Pin
Jim Crafton15-May-09 8:02
Jim Crafton15-May-09 8:02 
GeneralRe: Curious COM question - the case of the second exe server... Pin
CPallini15-May-09 11:48
mveCPallini15-May-09 11:48 
JokeRe: Curious COM question - the case of the second exe server... Pin
Rajesh R Subramanian16-May-09 1:50
professionalRajesh R Subramanian16-May-09 1:50 
GeneralRe: Curious COM question - the case of the second exe server... Pin
CPallini16-May-09 2:06
mveCPallini16-May-09 2:06 
GeneralRe: Curious COM question - the case of the second exe server... Pin
Jim Crafton15-May-09 7:55
Jim Crafton15-May-09 7:55 
GeneralRe: Curious COM question - the case of the second exe server... Pin
Rajesh R Subramanian15-May-09 23:23
professionalRajesh R Subramanian15-May-09 23:23 
Questionhi Pin
Mohammadj15-May-09 5:28
Mohammadj15-May-09 5:28 
AnswerRe: hi Pin
David Crow15-May-09 7:04
David Crow15-May-09 7:04 
GeneralWelcome again! Pin
CPallini15-May-09 7:28
mveCPallini15-May-09 7:28 
GeneralRe: hi Pin
Mohammadj15-May-09 9:04
Mohammadj15-May-09 9:04 
AnswerRe: hi Pin
David Crow15-May-09 9:15
David Crow15-May-09 9:15 
The first thing I'd do is get rid of those unnecessary UpdateData() calls. They are a never-ending source of problems simply because most folks do not know how to use them.

You should then have something akin to:

void CHashiDlg::On_AddSubtract_action() 
{
    CString strNumA;
            strNumB,
            strResult;
 
    m_num1.GetWindowText(strNumA);
    m_num2.GetWindowText(strNumB);
 
    double numA = atof(strNumA),
           numB = atof(strNumB);
 
    // check whether the mouse clicked right half
    if (m_two_actions_botn.OnRight())
        strResult.Format("%f", numA + numB);
    else
        strResult.Format("%f", numA - numB);
        
    m_results.SetWindowText(strResult);
}


"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons


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.