hi, OriginalGriff,
The customer want only "Normal" keys as short-key separately, not with CTRL key for serval short-keys, as my mentioned, The
foxit reader software can support this. I capture WM_COMMAND message in mainfrm::PreTranslateMessage, get the top-level menu id, gonna simulate left-clicking of the mouse ,but has no respose, the codes as belows,
if (pMsg->message == WM_COMMAND)
{
if (ID_ZOOMIN == LOWORD(pMsg->wParam))
{
if (::GetKeyState(VK_CONTROL) < 0)
{
if (m_pMainMenu)
{
UINT n = m_pMainMenu->gt;GetMenuItemID(1);
::SendMessage((HWND)m_pMainMenu->GetSubMenu(1)->gt,GetSafeHmenu(),WM_COMMAND,MAKEWPARAM(0, m_pMainMenu->GetMenuItemID(1)),0);
}
return TRUE;
}
}
}
the ID_ZOOMIN is the sub-menu ID which short-key is "O". Now the before codes can forbid the ctrl+o keypad, but if press ctrl+o, this sub-menu has disappeared, lost focus. I am finding the reason.
Could OriginalGriff or anyboy tell me the reason or the other approach to finish this little funtion?
thanks,
waiting the reply