Creating custom events - Event Handling Overview vs. wxFormBuilder

Lars Uffmann aral at nurfuerspam.de
Wed Feb 20 03:32:37 PST 2008


Hey everyone!

I would like to create my own wxEvent, just a custom wxCommandEvent, no 
derived wxEvent, so I read the Event Handling Overview at
http://www.wxwidgets.org/manuals/2.6/wx_eventhandlingoverview.html

And this overview starts talking about macros (DECLARE_EVENT_TYPE, 
DEFINE_EVENT_TYPE, BEGIN_EVENT_TABLE, END_EVENT_TABLE) which is _really_ 
confusing me: The GUI code generated by wxFormBuilder doesn't use event 
tables, but instead uses virtual event handling functions and in the 
class constructor does a wxControl->Connect(...) call to connect an 
event handler to a control with a certain event id. I thought I had 
understood that part, now I am confused again.

Is it deprecated style to Connect() events?

And if not, why doesn't the documentation linked above make any mention 
of this?

Best Regards,

    Lars






More information about the wx-users mailing list