Hello. When you click on the 'x' box on the top right of the window, it sends a WM_DESTROY message. In the OnDestroy function, I have my code calling SetModifiedFlag(TRUE), however, I never get a prompt asking to save the document. What would be the correct way to save information from a form upon exiting from the form? Thanks.