Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question regarding Message Handler for WM_OnLButtonUp

Status
Not open for further replies.

pghsteelers

Technical User
Apr 21, 2006
121
US
I am going through creating some message handlers and having a problem understanding a certain situation.

To my understanding, if a base class member function is not set to "private" this it will be available and passed down to classes drived from that base class consisting of the member function in question.

However, when editing the message WM_OnLButtonUp, it will generate a call as

[source]
void CAppNameView::OnLButtonDown(UINT nFlags, CPoint point)
[/source]

but it also automatically generates a call to the member function in the base class

[source]
void CView::OnLButtonDown(nFlags, point)
[/source]

However, what I was hoping someone can clarify is, WHY, that has to be called if that member function should be available through my derived class of CAppNameView instead of needing a direct call to the base class member function.

Obviously, I missing the boat on this, if someone can direct me back on course to understand what I am missing.

Thanks,
 
It is just there to provide default processing. You can decide if you want to use that or not.....

private functions will not be available in derived classes. Only protected and public ones are. And then only the ones declared as being virtual will be automatically called upon in a derived class if you call them from a pointer to this derived class.

Greetings,
Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top