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<CMa inDlg>, public CTapiCall
In CMainDlg I have this override function:
virtual void OnCallStateIdle ()
In the CTapiCall class I see that OnInfoChange is called. However,
OnCallStateIdle never gets called in my CMainDlg class. What am I doing
wrong?
Angus Comber an***@iteloffic e.com 6 1572
"Angus Comber" <an***@NOitelof fice.com.PLEASE NOSPAM> wrote in message
news:40******** *************** @mercury.nildra m.net... 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<CMa inDlg>, public CTapiCall
In CMainDlg I have this override function:
virtual void OnCallStateIdle ()
In the CTapiCall class I see that OnInfoChange is called. However, OnCallStateIdle never gets called in my CMainDlg class.
Huh? Where did OnCallStateIdle suddenly come from?
What am I doing wrong?
Very hard to say since you neglected to post either the definition of the
function that isn't being called, or the code that is doing the calling.
I'm not psychic, post again.
john
"Angus Comber" <an***@NOitelof fice.com.PLEASE NOSPAM> wrote in message
news:40******** *************** @mercury.nildra m.net... 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<CMa inDlg>, public CTapiCall
In CMainDlg I have this override function:
virtual void OnCallStateIdle ()
In the CTapiCall class I see that OnInfoChange is called. However, OnCallStateIdle never gets called in my CMainDlg class.
Huh? Where did OnCallStateIdle suddenly come from?
What am I doing wrong?
Very hard to say since you neglected to post either the definition of the
function that isn't being called, or the code that is doing the calling.
I'm not psychic, post again.
john
Sorry - Here it is again:
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<CMa inDlg>, 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***@iteloffic e.com
Sorry - Here it is again:
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<CMa inDlg>, 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***@iteloffic e.com
"Angus Comber" <an***@NOitelof fice.com.PLEASE NOSPAM> wrote in message
news:40******** *************** @mercury.nildra m.net... Sorry - Here it is again:
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<CMa inDlg>, 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?
Sorry still don't get it. You are saying that the wrong function is being
called (or maybe no function at all, its not very clear). But you still have
not produced that code that calls the function, all the code you posted is a
few definitions, which doesn't help anyone.
What I want to see is something like this
void CSomeClass::som e_function()
{
some_variable->OnInfoChange(1 23); /* here I want
CMainDlg::OnInf oChange to be called but it calls CTapiClass::OnI nfoChange
instead */
}
If its more complex than that (I suspect it is) then I still need to see
*why* you expect CMainDlg::OnInf oChange to be called. You can't just post a
few perfectly valid definitions and say 'what am I doing wrong?'.
john
"Angus Comber" <an***@NOitelof fice.com.PLEASE NOSPAM> wrote in message
news:40******** *************** @mercury.nildra m.net... Sorry - Here it is again:
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<CMa inDlg>, 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?
Sorry still don't get it. You are saying that the wrong function is being
called (or maybe no function at all, its not very clear). But you still have
not produced that code that calls the function, all the code you posted is a
few definitions, which doesn't help anyone.
What I want to see is something like this
void CSomeClass::som e_function()
{
some_variable->OnInfoChange(1 23); /* here I want
CMainDlg::OnInf oChange to be called but it calls CTapiClass::OnI nfoChange
instead */
}
If its more complex than that (I suspect it is) then I still need to see
*why* you expect CMainDlg::OnInf oChange to be called. You can't just post a
few perfectly valid definitions and say 'what am I doing wrong?'.
john This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Angus Comber |
last post by:
Hello
I have a base class a bit like this:
class CTapiCall
{
// Constructor
public:
CTapiCall();
virtual ~CTapiCall();
|
by: Angus Comber |
last post by:
Hello
I have a base class a bit like this:
class CTapiCall
{
// Constructor
public:
CTapiCall();
virtual ~CTapiCall();
|
by: Mark Essex |
last post by:
I am trying to build an interface that requires the developer to use the
OVERRIDE option. I looked at abstract classes, but seemed to have a couple
of problems:
1. If you do this in a form, it appears that I can't get the designer to
display the derived forms
2. It forces the override in the derived form (form A), but if another form
(form B) derives from this derived form (form A), it isn't forced to
override the method.
|
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 "hide" a parent method's implementation verses simply overriding it
(ie take advantage of polymorphism)?
Thanks,
TJ
|
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 the way, the class is extends DataGridTextBoxColumn, so I wanting to
paint the DataGrid. Thanks!
protected override void Paint(System.Drawing.Graphics g,
System.Drawing.Rectangle bounds,System.Windows.Forms.CurrencyManager source,
int rowNum,...
| |
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
|
by: Marcel Hug |
last post by:
Hi NG !
I'm new in C# and I'm reading a book about the fundamentals and concepts.
In the chapter Methods it's written to use virtual, if i would like to
override the method in a subclass. This I've to do by using override.
It's also written, that's possible to "hide" the base class method by
using the new key word.
Because I've already written some C# code and I didn't know anything
|
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 used."
Could anybody tell me why gets() function is dangerous??
Thank you very much.
Cuthbert
|
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 take each step because I'm not 100%
sure about what I'm doing here.
First of all, I've created a WebBrowser class. It is defined as:
public class WebBrowser : AxSHDocVw.AxWebBrowser,
|
by: dolphin |
last post by:
Hi everyone . I am confused about the different between override
overload and hide.
May be I have a wrong opinion, I always think that hide is very
similar with override.
Both of them call the function of derived class,do not care the
function in the base class.
I know I make something wrong here, but i dont kow what the wrong it
is? Could some one point out for me? sorry for my poor english.
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |