Q:

MessageWindow - How can I tell if it has been destroyed?

I'm working with C# and CF and I need to use a MessageWindow to intercept Windows Messages.
There may be scenarios where the MessageWindow dies unexpectedly. This is a problem for me as the messages it is receiving are kinda important and i'd like to log the fact the Window has died.
Unfortunately I don't see any way (at least not in Managed API) that I can get this kind of notification. Can anyone help?

A:

Not sure what you mean by "dies" but generally speaking when a Window  is destroyed (including the one underlying a MessageWindow) you will get a WM_DESTROY call.  Can you look for that in the WndProc?

