Click here to Skip to main content
15,887,175 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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


GeneralRe: hi Pin
Mohammadj15-May-09 9:30
Mohammadj15-May-09 9:30 
GeneralRe: hi Pin
David Crow15-May-09 9:35
David Crow15-May-09 9:35 
GeneralRe: hi Pin
Mohammadj15-May-09 9:37
Mohammadj15-May-09 9:37 
QuestionRe: hi Pin
David Crow15-May-09 10:17
David Crow15-May-09 10:17 
AnswerRe: hi Pin
Mohammadj15-May-09 10:23
Mohammadj15-May-09 10:23 
QuestionRe: hi Pin
David Crow15-May-09 10:29
David Crow15-May-09 10:29 
AnswerRe: hi Pin
CPallini15-May-09 11:51
mveCPallini15-May-09 11:51 
GeneralRe: hi Pin
Mohammadj15-May-09 22:49
Mohammadj15-May-09 22:49 
QuestionReading a txt file fastly Pin
Raghav071015-May-09 5:09
Raghav071015-May-09 5:09 
AnswerRe: Reading a txt file fastly Pin
led mike15-May-09 5:15
led mike15-May-09 5:15 
AnswerRe: Reading a txt file fastly Pin
«_Superman_»15-May-09 5:17
professional«_Superman_»15-May-09 5:17 
AnswerRe: Reading a txt file fastly Pin
Stuart Dootson15-May-09 5:20
professionalStuart Dootson15-May-09 5:20 
AnswerRe: Reading a txt file fastly Pin
David Crow15-May-09 7:00
David Crow15-May-09 7:00 
AnswerRe: Reading a txt file fastly Pin
Joe Woodbury15-May-09 17:53
professionalJoe Woodbury15-May-09 17:53 
QuestionRe-assembling TCP/IP Packets Pin
Koolski15-May-09 5:02
Koolski15-May-09 5:02 
AnswerRe: Re-assembling TCP/IP Packets Pin
led mike15-May-09 5:12
led mike15-May-09 5:12 
GeneralRe: Re-assembling TCP/IP Packets Pin
Rick York15-May-09 5:59
mveRick York15-May-09 5:59 

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.