diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 5e6a94c0f..ef2a15ac0 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -3911,7 +3911,8 @@ void Notepad_plus::checkUnicodeMenuItems() const if (encoding == -1) { // Uncheck all in the sub encoding menu - ::CheckMenuRadioItem(_mainMenuHandle, IDM_FORMAT_ENCODE, IDM_FORMAT_ENCODE_END, IDM_FORMAT_ENCODE, MF_BYCOMMAND); + HMENU _formatMenuHandle = ::GetSubMenu(_mainMenuHandle, MENUINDEX_FORMAT); + doCheck(_formatMenuHandle, IDM_FORMAT_ENCODE); ::CheckMenuItem(_mainMenuHandle, IDM_FORMAT_ENCODE, MF_UNCHECKED | MF_BYCOMMAND); if (id == -1) //um == uni16BE_NoBOM || um == uni16LE_NoBOM @@ -3941,7 +3942,8 @@ void Notepad_plus::checkUnicodeMenuItems() const ::CheckMenuItem(_mainMenuHandle, IDM_FORMAT_ANSI, MF_UNCHECKED | MF_BYCOMMAND); // Check the encoding item - ::CheckMenuRadioItem(_mainMenuHandle, IDM_FORMAT_ENCODE, IDM_FORMAT_ENCODE_END, cmdID, MF_BYCOMMAND); + HMENU _formatMenuHandle = ::GetSubMenu(_mainMenuHandle, MENUINDEX_FORMAT); + doCheck(_formatMenuHandle, cmdID); } }