If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Re: Inheritance Question

Mike, InsertColumn is PUBLIC. Your SetBoundary is PROTECTED. Does that tell you anything?

Originally Posted by MSDN

private
Class members declared as private can be used only by member functions and friends (classes or functions) of the class.

protected
Class members declared as protected can be used by member functions and friends (classes or functions) of the class. Additionally, they can be used by classes derived from the class.

public
Class members declared as public can be used by any function.

The problem is that you are calling SetBoundary from a derived class, but not for the current instance (this) but for another object. That doesn't work, because it's not allowed by the definition of the protected accessing rights.

Re: Inheritance Question

Originally Posted by MikeB

[B]
Now I left out the ctors/dtors for clarity. Also, I called SetBoundary(...) from a CTaskPlanPage object in CTaskPlan::OnInitialUpdate() to test. This compiles fine. But when I call SetBoundary() from the CTaskPlanPageHeader object, the compiler tells me it is invalid. It is public inheritance.

* The Perfect Platform for Game Developers: Android
Developing rich, high performance Android games from the ground up is a daunting task. Intel has provided Android developers with a number of tools that can be leveraged by Android game developers.

* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.