paragui-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[2]: [paragui-users] virtual method call


From: taurus
Subject: Re[2]: [paragui-users] virtual method call
Date: Tue, 23 Jul 2002 12:17:39 +0100

Hello Andrew,

Monday, July 22, 2002, 7:00:46 PM, you wrote:

AF> Are you by any chance passing in a CDialog reference
AF> and not a pointer?

Well, its just like this:

CProgressDialog PG(...);
if (PG.DoModal==BTN_OK)
{
...
}
PG.Close();

AF> --- taurus <address@hidden> wrote:
>> Hello People,
>> 
>>       I`ve got a little problem, maybe someone knows
>> how to solve it.
>>       I`ve created a new class CDialog from
>> PG_Window.
>>       In CDialog I`ve added a virtual method Valid()
>> to check if I can
>>       close dialog window.
>> 
>>       /*/*/*/*/*/*/
>>       class CDialog : public PG_Window
>>       {
>>       public:
>>       ...
>>       virtual bool Valid() {return true;};
>>       ...
>>       }
>>       /*/*/*/*/*/*/
>> 
>>       Then I create a new class CProgressDialog from
>> CDialog:
>>       /*/*/*/*/*/*/
>>       class CProgressDialog : public CDialog
>>       {
>>       public:
>>       ...
>>       bool Valid() {return !IsSomthingEmpty()};
>>       ...
>>       }
>>       /*/*/*/*/*/*/
>>       
>>       But, at runtime, it will be called
>> CDialog::Valid() from
>>       CProgressDialog... :(
>> 
>>       Why does it call CDialog::Valid() instead of
>>       CProgressDialog::Valid ?!!
>> 
>>       Thank you!
>>       
>> Kind regards,
>>        taurus                          
>> 
>> address@hidden
>> 
>>  ->> "If you will have a megaphone, you will never
>> have to be alone..."
>> 
>> 
>> 
>> _______________________________________________
>> paragui-users mailing list
>> address@hidden
>>
AF> http://mail.freesoftware.fsf.org/mailman/listinfo/paragui-users


AF> __________________________________________________
AF> Do You Yahoo!?
AF> Yahoo! Health - Feel better, live better
AF> http://health.yahoo.com

AF> _______________________________________________
AF> paragui-users mailing list
AF> address@hidden
AF> http://mail.freesoftware.fsf.org/mailman/listinfo/paragui-users




Kind regards,
       taurus                          

address@hidden

 ->> "If you will have a megaphone, you will never have to be alone..."





reply via email to

[Prev in Thread] Current Thread [Next in Thread]