Overridding, inheritance etc
Hi,
I am not a newbie to VC++ programming but this has me stumped. I wish to override the method
BOOL PaginateTo(CDC* pDC, CPrintInfo* pInfo);
I have a CRichEditView derived class. MyEditViewClass.
In the header file i have declared it thus .
protected:
BOOL PaginateTo(CDC* pDC, CPrintInfo* pInfo);
This method is called from the method
void CRichEditView::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo)
my method never seems to get called, i have overrriden classes and methods loads of times so i would like to think i know what i am doing can anyone tell me why this doesnt work?
Thanks
Will
[676 byte] By [
wdhough] at [2007-11-20 1:26:48]

# 2 Re: Overridding, inheritance etc
Sorry let me see if i understand this, your saying that the PaginateTo method in CRichEditView needs to be virtual in order for me to override it? In other words i cant override it?
thanks
Will
# 3 Re: Overridding, inheritance etc
Sorry let me see if i understand this, your saying that the PaginateTo method in CRichEditView needs to be virtual in order for me to override it? In other words i cant override it?
thanks
Will
Kind of. If you're dealing with a pointer to the base class object, the function would ned to be virtual for it to be called in your derived class. If the pointer used to call it was of the derived type, the derived funciton would be called.
GCDEF at 2007-11-10 23:20:32 >
