473,473 Members | 1,874 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 1562
"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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
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
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.