Hi,
I have 2 dialog boxes. In the first dialog i'm getting input from the user to add two numbers and in the other dialog I'm printing the value.
i.e., when i click on the add button on the first dialog , the current dialog shoud close and it must open the dialog that displays result. and again when i click on the OK button on the second dialog, it should close the current dialog and call the first dialog again.
I'm able to call the second dialog from first one, but i dont know how to close and reopen it again.
can somebody help me..........
Dialog 1
void CMfctestDlg::Sum()
{
UpdateData (true);
this->SetWindowText("Result");
Result *obj = new Result;
obj->Create(IDD_DIALOG1, this);
obj->ShowWindow(SW_SHOW);
obj->Final_Result (m_arg1, m_arg2);
}
Dialog 2
void Result::Final_Result(int i, int j)
{
m_result = i + j;
UpdateData (false);
}