Added SetDialogWindow method