>I am creating Menu at runtime using winapi InserMenu.
>But I couldn't figure out how to write code for the menus created at run
>time.
>
You need to subclass your form and catch WM_COMMAND messages. If you've
never tried subclassing before, you can get a good example from my Web
site -- download SubCls32.zip from the Subclassing section in the Source
Code Area of my Web site.
--
Ben Baird, MVP
Visual Basic Thunder 3.0
http://www.cyberhighway.com/~psy/vbthunder/
Common Controls Replacement Project
http://www.mvps.org/ccrp/
Please keep your questions on the newsgroups.