Inheritance problem

Hi

I have created a new View based on CScrollView. Let us call this CMyScrollView.

From this new class I have created another view class which inherits from it e.g.

class CMyApplicationView : public CMyScrollView

Everything compiles fine but something is obviously wrong!

In CMyScrollView I deal with things like OnCreate, OnMouseMove, OnLButtonDown, OnSetCursor. However, these functions are never called i.e. I placed breakpoints there and they are never entered.

Can anybody tell me what I have done wrong?

As a matter of interest, some functions are called e.g. OnInitalUpdate is called.

Thanks in advance

John
IssacJonesAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ZoppoCommented:
Hi IssacJones,

maybe your view's message map is wrong - did you add these functions manaully or via ClassWizard or 'Add Event' or something?

Could you post the part of your view's file which starts with BEGIN_MESSAGE_MAP and ends with END_MESSAGE_MAP?

ZOPPO
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AndyAinscowFreelance programmer / ConsultantCommented:
How do you create the CMyApplicationView ?
0
IssacJonesAuthor Commented:
Yes, I'd forgotten to update the message maps in the child class so they called CMyScrollView
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.