Hi, everyone.
Basically, the question is in the subject: how do I check if some UI control is constructed or not (or already destroyed, as in my case)? Sometimes controls' inner implementation (_pControlImpl) seems to be destroyed automatically by the system, and while the wrapper object is still valid, trying to call its methods leads to the app crashing. I could easily avoid this, if I could check if the object has already been destroyed. But so far the only way to do this that I've found is to derive from the class in question, overload OnTerminating and store the object's state in some boolean variable. Yet, this is quite ugly. Does anyone know a better way? Have I overlooked something?