Code:
            HMENU hPopupMenu = CreatePopupMenu();
            InsertMenu(hPopupMenu, 
                       0,
                       MF_BYPOSITION | MF_STRING,
                       (UINT_PTR)hPopupMenu,
                       GlobalBuf2);
            TrackPopupMenu(hPopupMenu,
              TPM_BOTTOMALIGN | TPM_LEFTALIGN | TPM_LEFTBUTTON,
                       p.x,
                       p.y,
                       0, //Reserved; must be zero.
                       hDlg, 
                       NULL); //Ignored.
I know that hDlg receives all messages from the menu.
But what kind of messages it gets?

I put a WM_LBUTTONDOWN case in WM_COMMAND but nothing happens when i click on the context menu.