Well, I would like to make a OO design for a simple windowing system.

But my problem is actually that I cannot create a parent/children management system. I have an interface (pure abstract) and an implmentation-help class, but when it comes to setting the Windows' handle (HWND) of a window, I have to access the implementation through my interface. I could use a dynamic_cast but there is another problem, my parent window inherit the implmentation class with private access so I cannot upcast the pointer from outside this parent class.

How can I provide a general way of retrieving the handle (which is declared in the implmentation base class) from an interface I don't know the real type of?