EVT_CUSTOM function type errors...

Mark Williams (MWP) mwp at internode.on.net
Wed Sep 5 10:07:59 PDT 2007


Hi all,

I have:

class MyApp: public wxApp
{
	......
	void OnThreadEnd(wxCommandEvent &event);
}

BEGIN_EVENT_TABLE(MyApp, wxApp)
	EVT_CUSTOM( myEVT_THREAD_END, wxID_ANY, MyApp:OnThreadEnd)
END_EVENT_TABLE()

void MyApp::OnThreadEnd(wxCommandEvent &event)
{
	....
}

On compiling under MSVS-2005, i get the error:
cannot convert from 'void (__thiscall MyApp::*)(wxCommandEvent &)' to 'wxEventFunction'

Whats wrong with this??

Thanks in advance.




More information about the wx-users mailing list