In C++/WinRT, is it possible to defer activation of a composed base class?

96 Views Asked by At

Let's say you declare a runtime class that derives from (i.e., composes) a runtime base class.

From what I can tell, C++/WinRT will set up your class so that the base class is activated automatically during construction. I think it takes place within the constructor of a (compile-time) base class.

But is it possible to somehow override that behavior so that you activate the base class when and how you so choose? For example, perhaps at runtime, you'd like to choose between some different intermediate classes to serve as the composed object.

I think ATL gives you this ability, since you're in control and responsible for instantiating an aggregated component.

Thanks for any help.

0

There are 0 best solutions below