The reason the parent window can be closed is because its parent too is the main window's (i.e., (long)AfxGetMainWnd()->m_hWnd) as well as its children. This allows for all the modal dialogs to open and not continue in the code sequentially until OK or Cancel has been clicked. I need to open more dialogs from this parent dialog in order to compare and modify values (of the contents). I cannot use modeless dialogs because it continues computing without the user selecting OK or Cancel; it just creates the dialog and will create multiple dialogs of the same type or instance rather. I have been able to reactivate the dialog that has been opened already by using a PropertyFrame pointer. I cannot just close the dialogs via WM_CLOSE, but should prevent the parent dialog from closing as long as its children dialogs are opened. That too will be as difficult.