You must show the message box from within the
OnOK()
handler of your straw dialog box:
void straw::OnOK()
{
MessageBox("dfdfd","dfdfd",MB_OK);
CDialog::OnOK();
}
When you now press the OK button in the straw dialog, the message box is shown and the straw dialog is closed after closing the message box.