i have a composite control, which contains another control..
i have a property in this control which i want to forward to the other one..
as a simpler example:
i have a property TestProperty, which is of the contained object.. i made a TestProperty in the composite control and in put/get code i just do something like
STDMETHODIMP CNMGrid::put_TestProperty(VARIANT_BOOL newVal)
i implement IPersistPropertyBagImpl and, as a result, my put_ methods are called when launching from VB (as for example)..
but! the problem is that those are called _before_ the composite control instantiates the contained windows..
that means it gets in put_TestProperty before the contained control is created, so m_containedCtrl is NULL..
how can i solve this problem?
1. to reload the properties, but i don't know how to obtain the PropertyBag that i need..
2. other ideas? :)
for 1. i've tried something like the following code, but it doesn't work (i get pPropBag NULL).. i'm not doing the right thing?
HRESULT hr = GetClientSite(&pOleClientSite);
hr = pOleClientSite->GetContainer(&pOleContainer);
i hope i was clear.. even if to be so is something unusual at me..