RemoveDlg and cmd_* function developed.