CMenu DeleteMenu()
-
Hi, what is the difference between MF_BYPOSITION and MF_BYCOMMAND in DeleteMenu() function of CMenu class.I have problem with MF_BYCOMMAND is not working properly.
-
Hi, what is the difference between MF_BYPOSITION and MF_BYCOMMAND in DeleteMenu() function of CMenu class.I have problem with MF_BYCOMMAND is not working properly.
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 specifyMF_BYCOMMAND
. Viceversa, if you want to specify the menu item via its position inside the menu then useMF_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