..wow.....that was a lot more work than i thought it would be, but i believe that i got it working now. having this function with a MDI is quite the hassle as you must check in multiple places to see if theres an unsaved file before closing the files or the program, and then find out which file it is that is not saved. and then once you do save it, you have to notify your program of that. however, i won't continue to ramble on..just thought that someone wanting to accomplish a similar task may find that info useful.