Dynamic function

I got a problem that I need to establish the menu structure dynamically. I
know I can do that. But, when the user select a menu-item, the function that
actually invoked can only determined in run-time. How can I program it in
Delphi 4?

Thank you very much in advance.

Albert Mo.