Quote Originally Posted by Yves M
I may be missing something, but why do you even need a cast? CWindow is a derived class of CApplicationCallback so you don't need a cast to assign a derived pointer to a base pointer.
Yes you missed something. His inheritance is private.

Try making the inheritance public thus:
Code:
class CWindow : public CApplicationCallback
{
// etc.
};