How Do I Set Ambient Properties for My Controls?

Given only the handle of an "AtlAxWin" window, you can get the IUnknown interface pointer of the host object by calling AtlAxGetHost. You can query that pointer for either the IAxWinHostWindow or IAxWinAmbientDispatch interface. The IAxWinAmbientDispatch interface allows you to set the ambient properties available to the hosted control.

If you have a CAxWindow object, you can get an interface on the host object by calling CAxWindow::QueryHost.

ATL Control Containment FAQ