From MSDN [^]: MF_BYCOMMAND Identifies menu item position by command. [...] MF_BYPOSITION Identifies menu item position by zero-based relative position. [...] i.e. if you need to access the menu via its ID (like, for instance, IDM_EXIT) then you have to specify MF_BYCOMMAND. Viceversa, if you want to specify the menu item via its position inside the menu then use MF_BYPOSITION) Is it clear enough? :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke