473,406 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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

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
an***@iteloffice.com

Jul 22 '05 #1
6 1560
"Angus Comber" <an***@NOiteloffice.com.PLEASENOSPAM> wrote...
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
Jul 22 '05 #2
"Angus Comber" <an***@NOiteloffice.com.PLEASENOSPAM> wrote...
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
Jul 22 '05 #3
Joe
where is the FAQ Victor?

Thanks
"Victor Bazarov" <v.********@comAcast.net> wrote in message
news:gOVdc.113513$K91.324845@attbi_s02...
"Angus Comber" <an***@NOiteloffice.com.PLEASENOSPAM> wrote...
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

Jul 22 '05 #4
Joe
where is the FAQ Victor?

Thanks
"Victor Bazarov" <v.********@comAcast.net> wrote in message
news:gOVdc.113513$K91.324845@attbi_s02...
"Angus Comber" <an***@NOiteloffice.com.PLEASENOSPAM> wrote...
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

Jul 22 '05 #5

"Joe" <jb****@NOSPAMwowmail.com> wrote in message
news:YS********************@news4.srv.hcvlny.cv.ne t...
where is the FAQ Victor?

Thanks

http://www.parashift.com/c++-faq-lite/

john
Jul 22 '05 #6

"Joe" <jb****@NOSPAMwowmail.com> wrote in message
news:YS********************@news4.srv.hcvlny.cv.ne t...
where is the FAQ Victor?

Thanks

http://www.parashift.com/c++-faq-lite/

john
Jul 22 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: domeceo | last post by:
can anyone tell me why I cannot pass values in a setTimeout function whenever I use this function it says "menu is undefined" after th alert. function imgOff(menu, num) { if (document.images) {...
6
by: Angus Comber | last post by:
Hello I have a base class a bit like this: class CTapiCall { // Constructor public: CTapiCall(); virtual ~CTapiCall();
6
by: Angus Comber | last post by:
Hello I have a base class a bit like this: class CTapiCall { // Constructor public: CTapiCall(); virtual ~CTapiCall();
3
by: Tom Jones | last post by:
I do not understand what is meant when someone states that a given method is "hidden" verses overriden. Would someone please provide a short example of both cases and why you might want to...
1
by: Craig | last post by:
I've tried to override the paint method and I can't get the overriden paint method to get called. I put the the method below within the class, but it never gets called when I open up my form. By...
15
by: Cliff_Harker | last post by:
Why can't I do this in C# public class A { public A virtual whatever( A a ) { } } public class B : A
16
by: mdh | last post by:
May I ask the group the following: (Again, alas , from K&R) This is part of a function: while ( ( array1 = array2 ) != '\0' ); /* etc etc */ Is this the order that this is evaluated? ...
89
by: Cuthbert | last post by:
After compiling the source code with gcc v.4.1.1, I got a warning message: "/tmp/ccixzSIL.o: In function 'main';ex.c: (.text+0x9a): warning: the 'gets' function is dangerous and should not be...
2
by: Fredo | last post by:
I'm going to try to post this without having to paste in hundreds of lines of code. I'm trying to override IInternetSecurityManager. I'm taking sort of a minimalist approach and adding code as I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.