wxEvtHandler::Connect

Riccardo Corona coronariccardo at gmail.com
Wed May 16 09:52:21 PDT 2007


Hi,
I've this situation:

Class A{


}

Classe B: public wxEvtHandler, public A{



}


Now, when I try to connect a timer event into the costructor of B :

....
//timer is a wxTimer
B::B{
    long timerid =3D ::wxNewId();
    timer.SetOwner(this,timerid);
    Connect(timer.GetId(), timerid, wxEVT_TIMER, (wxObjectEventFunction)
&B::OnTimer);
}
....
 I obtain this error:

error C2440: 'type cast' : cannot convert from 'void (__thiscall B::*)(class
wxTimerEvent &)' to 'void (__thiscall wxObject::*)(class wxEvent &)'
        Pointers to members have different representations; cannot cast
between them


What can it be the problem?

-- =

Riccardo Corona
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wx-users/attachments/20070516/450=
a2b84/attachment.htm


More information about the wx-users mailing list