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: Some ideas:
Can you "ping" the MessageWindow by generating an special message of your own every X interval? then check for this "ping" that way you can be sure to detect destruction within approx. X time.
Or can you override the Dispose or Finalize calls? if these get called. I am also assuming no exception is being thrown.

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?
