That was fixed after some search I traced the processing of the key
I reached this MFC code
BOOL CMFCToolBar::TranslateChar(UINT nChar)
{
if (!CKeyboardManager::IsKeyPrintable(nChar))
{
return FALSE;
}
UINT nUpperChar = CKeyboardManager::TranslateCharToUpper(nChar);//this line guided me
CMFCToolBarButton* pButton = NULL;
if (!m_AccelKeys.Lookup(nUpperChar, pButton))
{
return FALSE;
}
ASSERT_VALID(pButton);
// Save animation type and disable animation:
CMFCPopupMenu::ANIMATION_TYPE animType = CMFCPopupMenu::GetAnimationType();
CMFCPopupMenu::SetAnimationType(CMFCPopupMenu::NO_ANIMATION);
BOOL bRes = DropDownMenu(pButton);
// Restore animation:
CMFCPopupMenu::SetAnimationType(animType);
if (bRes)
{
return TRUE;
}
return ProcessCommand(pButton);
}
I traced this line CKeyboardManager::TranslateCharToUpper(nChar); it start with
UINT __stdcall CKeyboardManager::TranslateCharToUpper(const UINT nChar)
{
if (nChar < VK_NUMPAD0 || nChar > VK_NUMPAD9 ||
(::GetAsyncKeyState(VK_MENU) & 0x8000))
{
if (!CMFCToolBar::m_bExtCharTranslation)
{
I searched for the CMFCToolBar::m_bExtCharTranslation, I got that bug report http://connect.microsoft.com/VisualStudio/feedback/details/525656/hot-key-is-not-working-on-russian-language-for-applications-which-uses-mfc-feature-pack
The Solution
we needed the following addition in the startup of the application I put it in the method CMainFrame::OnCreate
CMFCToolBar::m_bExtCharTranslation = TRUE;//it is FALSE by default