Need to catch Close message in Formview
-
I have a Formview class and I'm trying to display a message box when the user hits the X to close the form. If I do the processing in OnDestroy, the message box doesn't show up until after the form has closed. How can I show this messagebox before the form goes away? I tried to catch a WM_CLOSE or WM_DESTROY message with PreTranslateMessage, but neither seem to work.
-
I have a Formview class and I'm trying to display a message box when the user hits the X to close the form. If I do the processing in OnDestroy, the message box doesn't show up until after the form has closed. How can I show this messagebox before the form goes away? I tried to catch a WM_CLOSE or WM_DESTROY message with PreTranslateMessage, but neither seem to work.
-
I have a Formview class and I'm trying to display a message box when the user hits the X to close the form. If I do the processing in OnDestroy, the message box doesn't show up until after the form has closed. How can I show this messagebox before the form goes away? I tried to catch a WM_CLOSE or WM_DESTROY message with PreTranslateMessage, but neither seem to work.
Handle WM_CLOSE in your frame window class and not in your view class as you might probably be doing now. Nish
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]