Acceleration keys on CMenu is not shown !
-
I create dynamically a CMenu inside a CDialog that have some acceleration keys ie
m_pBCMenu->AppendMenu(MF_STRING, ID_MENU_STRETCH_NORMAL, _T("&Size\tAlt+1"));
The same menu, is also created inside in CMainFrm that all command events (even from the CDialog) are routed and handled in there. The problem is that the acceleration keys in my CDialog are not shown, ie Alt+1 is hidden but the commands are routed just fine. How can I force to view the acceleration keys inside the CDialog's CMenu ? Note, that I used the LoadAccelerators function successfully on my onInitDialog and I also tried to use ON_COMMAND(xxx,xxxx) in my CDialog without any success. Any recommendations ?
sdancer75
-
I create dynamically a CMenu inside a CDialog that have some acceleration keys ie
m_pBCMenu->AppendMenu(MF_STRING, ID_MENU_STRETCH_NORMAL, _T("&Size\tAlt+1"));
The same menu, is also created inside in CMainFrm that all command events (even from the CDialog) are routed and handled in there. The problem is that the acceleration keys in my CDialog are not shown, ie Alt+1 is hidden but the commands are routed just fine. How can I force to view the acceleration keys inside the CDialog's CMenu ? Note, that I used the LoadAccelerators function successfully on my onInitDialog and I also tried to use ON_COMMAND(xxx,xxxx) in my CDialog without any success. Any recommendations ?
sdancer75
Are the accelerators shown when pressing the Alt key? Then this MSDN blog post answers your question why they are not shown: http://blogs.msdn.com/b/oldnewthing/archive/2005/05/03/414317.aspx[^].
-
Are the accelerators shown when pressing the Alt key? Then this MSDN blog post answers your question why they are not shown: http://blogs.msdn.com/b/oldnewthing/archive/2005/05/03/414317.aspx[^].