Re: Message Map with multiple inheritance
- From: "Tim" <Tim@NoSpam>
- Date: Thu, 2 Jun 2005 11:24:39 +1200
What does the implementation of the timer function look like?
What should the implementation of the timer function look like?
The warning indicates the two do not agree.
So long as your IImporterProcessCallback class does not inherit from CDialog
or CObject then there should be no inheritance issues - this is likely a red
herring.
- Tim
"Burt" <burt@xxxxxxxxxxxxxxxxx> wrote in message
news:VRqne.124131$Yr4.82457@xxxxxxxxxxxxxxxxxxxxxxxxx
>I am pulling out my hair on this one! I want to create a simple message
>map for a timer. I have:
>
> BEGIN_MESSAGE_MAP(ImportProgress, TDialog)
> ON_WM_TIMER()
> END_MESSAGE_MAP()
>
> And the WM_TIMER gives me a compiler error of:
>
> warning C4407: cast between different pointer to member representations,
> compiler may generate incorrect code
>
> (we have "treat warnings as errors" so this prevents me from proceeding).
>
> I think the problem is that my class has multiple inheritance, being
> declared as:
>
> class ImportProgress : public IImporterProcessCallback, public TDialog
>
> using the TDialog (which inherits through 3 other levels and finally
> reaches CDialog) is the message chain I want to use.
>
> Questions:
>
> 1) Am I correct that this is the source of the warning?
>
> 2) Would it be safe to just turn off this one warning? (If so, how do I
> do that? I know there is some compiler directive, but I new to MFC...)
>
> 3) Is there a syntax for message map declarations to give multiple
> inheritors?
>
.
- References:
- Message Map with multiple inheritance
- From: Burt
- Message Map with multiple inheritance
- Prev by Date: Re: Accessing a document from classes that are included in a dialo
- Next by Date: Re: Check Box
- Previous by thread: Message Map with multiple inheritance
- Next by thread: Re: Message Map with multiple inheritance
- Index(es):
Relevant Pages
|