Setting up a pop-up menu
Posted on 2000-03-13
At the moment, I have created my pop-up menu like so:
HMENU hMenu = CreatePopupMenu();
bSuccess = AppendMenu( hMenu, MF_STRING, 1, "&Colours" );
bSuccess = AppendMenu( hMenu, MF_STRING, 2, "&Highlight" );
UINT iMenu = TrackPopupMenu( hMenu, TPM_RIGHTALIGN | TPM_RETURNCMD | TPM_LEFTBUTTON, point.x, point.y, 0, m_xList.GetParent(), NULL );
I would prefer to define a menu resource instead, but I am not sure how to reference that instead. I have looked at the method LoadMenu() but I can't get hold of the hInstance to the application.
Are there any other ways to do this..