Polymorphism of wxWindows
63q2o4i02 at sneakemail.com
63q2o4i02 at sneakemail.com
Sat Sep 2 13:50:43 PDT 2006
Hi, I was trying to access a member function of a wxPanel by using a
wxWindow* pointer that had been assigned to a wxPanel. I don't
remember the name of the function, but the compiler complained that the
function was not a member of wxWindow. I thought this was a perfect
example of where polymorphism should work, but it didn't. I had to
make a pointer to wxPanel instead, and then it worked.
Same thing for MyApp derived from wxApp... I tried accessing a member
variable of MyApp with a wxApp* pointer that had been assigned to
MyApp, and the compiler didn't like it.
Is this normal behavior or am I doing something wrong?
wxMSW 2.7.0-1, MSVC++ Express, WinXP-SP2
(Sorry, I don't have example code. I'm at home now and this is a work
project).
ms.
More information about the wx-users
mailing list