Compartir a través de


How Do I Destroy a Control?

The best way to destroy a control is to destroy the host window. You can do this explicitly by calling either CWindow::DestroyWindow or the DestroyWindow API, or implicitly by letting the destruction of the host window's parent cause its death. Any of these methods will effectively destroy the hosted control. Note that the destruction of a CAxWindow object does not cause the destruction of the underlying "AtlAxWin80" window.

See Also

Concepts

ATL Control Containment FAQ