paragui-users
[Top][All Lists]
Advanced

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

[paragui-users] virtual method call


From: taurus
Subject: [paragui-users] virtual method call
Date: Mon, 22 Jul 2002 18:29:16 +0100

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..."





reply via email to

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