Thank you for replying, Vadim.
I am trying to understand how to best handle some common patterns, in this
case modeless dialogs. Such patterns are probably obvious to seasoned
wxWidgets programmers, but I am still learning. Most things in wxWidgets
appear very clear & concise, and fairly easy to understand. But I have been
confused about some simple things, e.g. how to handle OK and Cancel in
dialogs, but it is getting a bit clearer now.
I followed your advice and fund I could do
and similar using wxMouseEventHandler for mouse events. I had not seen this
before, so thank you. I agree it is much cleaner. I did the casting, because
that is what wxSmith does in Code::Blocks.
Now, based on your comment I also found I could do
After looking at it, it seems obvious. Part of the problem here is pieceing
together all the available information. I knew about event tables, I have
read the wxWidgets book etc.. Still, somehow it was not obvious to me what
to do with a call like CreateButtons(wxOK|wxCANCEL); wrt. handling the
event. You have to understand that wxOK isn't wxID_OK of example, it took me
So I think your replied to my concrete question was useful, the best would
here be to use the event table I guess. But it was also useful to learn
about better ways of using Connect(...), since it is sometimes necessary to
install events at runtime (I have seen it with some mouse events).
Still learning, thanks for your time :-)
Carsten A. Arnholm