Yo, I have a weird problem...
I create dinamically a popupmenu, then dinamically add to it some menuitems, to each of which I assign an OnAdvancedCustomDrawItem and an OnClick event handler (all the items have the same...) To be able to do so _without_any_form_ I have created a dummy class (of TObject) which contains the OnClick and OnAdvancedCustomDrawItem handlers for the TMenuItems above. Well, the OnAdvancedCustomDrawItem procedure gets called, as I see the menu items displaying what I want them to, while the OnClick doesn't (there I set a return value according to the menuitem I clicked and this never changes) All the above I do inside a function; the menu and the dummy class are local to it, and I create, use and destroy them from within it. Any clue? Cheers, A.