Zlatin,
>
>So, Visual FoxPro HWND control is hosted in its own window. Other ActiveX controls like the TreeView control also are hosted in own windows. However we do not experience such problems with these controls. So it is our control and FoxPro doing something "wrong". I need to figure out what is this and how to prevent it.I've never tried writing a visual ActiveX control, so I don't even have a clue as to what's happening here.
>
>Yes, this is what we do now... We check the BaseClass of the ActiveForm property... but it is dirty code and does not conform to what VFP help says about the ActiveForm property.Sometimes the documentation is wrong (although I think it's more a difference in your ActiveX in this case). Sometimes we have to write code that isn't very pretty. *s*