asked on
m_menu.EnableMenuItem( ID_LANGUAGES_LANG1, MF_DISABLED|MF_GRAYED|MF_BYPOSITION );
ASKER
ASKER
ASKER
C++ is an intermediate-level general-purpose programming language, not to be confused with C or C#. It was developed as a set of extensions to the C programming language to improve type-safety and add support for automatic resource management, object-orientation, generic programming, and exception handling, among other features.
TRUSTED BY
first, if you want to use an ID as in your sample you need to do it with 'MF_BYCOMMAND' instead of 'MF_BYPOSITION'.
But, as you told, a sub menu doesn't have an ID, so you'll have to iterate through the menu items of the parent menu until you find the sub menu you want to disable. This way you can examine it's position (index) in the parent menu.
Hope that helps,
ZOPPO