im making a program that has a button on the dialog. When pressed, it pops up another dialog.It is a math calculator program. This specific button calculates square root. I need to have the thing go in a child window(modal dialog) because i have other formula buttons to add... So i go in the class wizard, create a dialog of the CDIALOG BASE ....then i try to add a message handel..... then on my main dialog, i add the code CDialog aboutDlg(IDD_ABOUTBOX); // Create and show the dialog box INT_PTR nRet = -1; nRet = aboutDlg.DoModal(); // Handle the return value from DoModal switch ( nRet ) { case -1: AfxMessageBox("Dialog box could not be created!"); break; case IDABORT: // Do something break; case ID_SOMETHING: MessageBox("hello", "bonjour(s)", MB_OK); break; case IDCANCEL: // Do something break; default: // Do something break; }; i know DOMODAL IS RESTRICTED in a few perimters but someone told me to create a class and make message handles...than override domodal with my code...nothing happens....message box does not appear ....i just lost though..nothing is working at all..please give me detials or a tutorial on how to create a class derived from CDIALOG than add message handles.