My override function never gets called? - (reposting as mistake in first go)

A

Angus Comber

Hello

I have a base class a bit like this:

class CTapiCall
{
// Constructor
public:
CTapiCall();
virtual ~CTapiCall();

// Overridable methods for notifications
virtual void OnInfoChange (long InfoState);

// Etc
};


Then I inherit from this class:

class CMainDlg : public CDialogImpl<CMainDlg>, public CTapiCall

In CMainDlg I have this override function:

virtual void OnInfoChange (long InfoState);

In the CTapiCall class I see that OnInfoChange is called. However,
OnInfoChange never gets called in my CMainDlg class. What am I doing
wrong?

Angus Comber
(e-mail address removed)
 
V

Victor Bazarov

Angus Comber said:
I have a base class a bit like this:

class CTapiCall
{
// Constructor
public:
CTapiCall();
virtual ~CTapiCall();

// Overridable methods for notifications
virtual void OnInfoChange (long InfoState);

// Etc
};


Then I inherit from this class:

class CMainDlg : public CDialogImpl<CMainDlg>, public CTapiCall

In CMainDlg I have this override function:

virtual void OnInfoChange (long InfoState);

In the CTapiCall class I see that OnInfoChange is called. However,
OnInfoChange never gets called in my CMainDlg class. What am I doing
wrong?

Wrong: not posting the complete code.

Wrong (maybe): not calling it for the CMainDlg object.
Wrong (maybe): the function is really misspelled in your code.
Wrong (maybe): the function has a different set of parameters.

I can keep guessing, but what's the point? Without seeing your code
how can we offer a solution? Read the FAQ, section 5, question 5.8.

Victor
 
J

Joe

where is the FAQ Victor?

Thanks


Victor Bazarov said:
Wrong: not posting the complete code.

Wrong (maybe): not calling it for the CMainDlg object.
Wrong (maybe): the function is really misspelled in your code.
Wrong (maybe): the function has a different set of parameters.

I can keep guessing, but what's the point? Without seeing your code
how can we offer a solution? Read the FAQ, section 5, question 5.8.

Victor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top