Hello, the codegurus around the world.;) If you use the debugger, you may find the reason. I think that ::MessageBox() should be called in if (response == IDOK) The other way is that we put MessageBox() in CMyDialog::OnOK(). We often tend to use MessageBox() to check something. But, TRACE, TRACE1, and so on works also in the debug mode.
void CMyDialog::OnOK()
{
MessageBox("OK button works", "Test");
TRACE ("OK button works")
// In Debug mode, "OK button works" shows in Output windows;
CDialog::OnOK();
}
Have a nice day! -Masaaki Onishi-