MATLAB version 4.2 has some functions that will help you do this. See help on dialog for more information.