Create your program (for example CDialog)
then go to resource and right click in resource and use Add resource in this window use Menu and ok
now you can insert elements after insert item you can right click in each element and use Add event handler... in the class list you can select your class and click Add and edit
then if it work you can see your function that depend to menu and write your code.
if you dont want to use resource you can create your menu (dymanic) that of course its not easy than to use above way