i just wrote a couple programs that had menus
and - there was another thread on menus
they are fairly simple, really
after LoadMenu returns an HMENU handle....
1) you can put it in the WNDCLASSEX structure - all windows of that class will have the menu
2) you can use the handle as a parameter for CreateWindowEx - just that window will have the menu
3) or, after you have created a window, you can use SetMenu
for a context menu, LoadMenu in WM_CREATE and store the handle in a global variable
then, when a WM_RBUTTONUP or a WM_CONTEXTMENU message is received, call TrackPopupMenu
the wParam or lParam parms for those messages has the mouse position
for WM_RBUTTONUP, you have to translate client coordinates to screen coordinates
for WM_CONTEXTMENU, they are already screen coordinates, which is what TrackPopupMenu needs
why the first class-items have no ID
i don't understand that one :P