GUI event handling for individual widgets

"David Christian" <[email protected]>
Newsgroups gmane.lisp.allegro
Message-ID <000201c30aac$a154fca0$8e090e98@shodan>
I would like to have it so that when I right-click on a specific instance of
a control, specifically, either a list or a outline, I get a popup menu.
I've read the event-handling help page and looked at the tutorial examples,
but there is just some missing information I need to figure out how this
works.

For example, for the list widget, according to the docs, I'm supposed to
capture WM_RBUTTONDOWN for the widget's window after subclassing it.  But I
only want to do this for one instance of the control (or two, or five, but
not all of them).   Is there a way I associate a function with a particular
instance of a control, or a way I can programmatically ensure that it only
gets called for that particular instance of the widget?  

For the outline widget, I need to do something similar, in that I need to
set up a mouse-right-down event for the widget's window...but again, only
for one instance of the widget, not for the whole class.

I would just create real subclasses of these widgets, but then I lose all of
the functionality of the IDE with windows with these widgets in them.  And I
would still have the problem of associating behavior based on other events
to a individual control.

Is what I am talking about possible, and if so does anyone have any good
examples?
David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.