Following MFC code sets accessible Name for popup menu item to "accessible text". It works on Windows 7/8 but on Windows 10 accessible name remains "item text".
Please help with fix / workaround.
CMenu menu1;
menu1.CreatePopupMenu();
menu1.AppendMenu(0, 1, TEXT("item text"));
CComPtr<IAccPropServices> accPropServices;
accPropServices.CoCreateInstance(CLSID_AccPropServices, nullptr, CLSCTX_SERVER);
accPropServices->SetHmenuPropStr(menu1, 1, PROPID_ACC_NAME, L"accessible text");
I check accessible properties with Windows SDK's inspect.exe
Please help with fix / workaround.
CMenu menu1;
menu1.CreatePopupMenu();
menu1.AppendMenu(0, 1, TEXT("item text"));
CComPtr<IAccPropServices> accPropServices;
accPropServices.CoCreateInstance(CLSID_AccPropServices, nullptr, CLSCTX_SERVER);
accPropServices->SetHmenuPropStr(menu1, 1, PROPID_ACC_NAME, L"accessible text");
I check accessible properties with Windows SDK's inspect.exe