Hi, fast solution! 1) catch OnCancel and don't call the parent. void CMyDlg::OnCancel() { //CDialog::OnCancel() } 2) Change ID of cancel button ID_MY_CANCEL and create a function. void CMyDlg::OnMyCancel() { CDialog::OnCancel(); } 3) Test it. Bye Peter