<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Menu shortcuts no longer works</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Menu shortcuts no longer works]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 18 Apr 2026 23:40:05 +0000</pubDate>
  <lastBuildDate>Mon, 08 Dec 2008 03:58:48 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=12694</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Menu shortcuts no longer works : I found a solution.1st step -...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12694&amp;PID=43472&amp;title=menu-shortcuts-no-longer-works#43472</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2024">MGebler</a><br /><strong>Subject:</strong> 12694<br /><strong>Posted:</strong> 08 December 2008 at 3:58am<br /><br />I found a solution.<br><br>1st step - Add the following method to the owner of the command bar:<br><br><font face="Courier New, Courier, mono">BOOL BoostAccelerator( MSG* pMsg )<br>{<br>&nbsp; if( GetCommandBars() &amp;&amp; GetCommandBars()-&gt;GetShortcutManager() )<br>&nbsp;&nbsp;&nbsp; return GetCommandBars()-&gt;GetShortcutManager()-&gt;TranslateAccelerator( pMsg ); <br><br>&nbsp; return FALSE;<br>}<br></font><br>2nd step - Override the PreTranslateMessage method of the child dialog:<br><br><font face="Courier New, Courier, mono">virtual BOOL PreTranslateMessage(MSG* pMsg)<br>{<br>&nbsp; if( WM_KEYFIRST &lt;= pMsg-&gt;message &amp;&amp; pMsg-&gt;message &lt;= WM_KEYLAST ) <br>&nbsp; { <br>&nbsp;&nbsp;&nbsp; CMainFrame* pMainFrame = ((CMainFrame*)AfxGetMainWnd());<br>&nbsp;&nbsp;&nbsp; if( pMainFrame &amp;&amp; pMainFrame-&gt;BoostAccelerator( pMsg ) )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return TRUE;<br>&nbsp; } <br><br>&nbsp; return __super::PreTranslateMessage(pMsg);<br>}<br><br><font face="Arial, Helvetica, sans-serif">The reason for this approach is that </font></font><font face="Arial, Helvetica, sans-serif">'Accelerators are not an automatic thing for dialogs' (</font><font face="Courier New, Courier, mono"><font face="Arial, Helvetica, sans-serif">http://msdn.microsoft.com/de-de/magazine/cc301409(en-us).aspx).<br><br>And now letīs have a look to the codejock grep sample - if I replace the CSearchOptionsView::PreTranslateMessage implementation with the BoostAccelerator version everything works in the right way. <br><br>So dear codejock team - which is the right approach to handle accelerators in child dialogs?<br><br><br></font><br></font><br><br>]]>
   </description>
   <pubDate>Mon, 08 Dec 2008 03:58:48 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12694&amp;PID=43472&amp;title=menu-shortcuts-no-longer-works#43472</guid>
  </item> 
  <item>
   <title><![CDATA[Menu shortcuts no longer works : Similiar constellation - same...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12694&amp;PID=43468&amp;title=menu-shortcuts-no-longer-works#43468</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2024">MGebler</a><br /><strong>Subject:</strong> 12694<br /><strong>Posted:</strong> 07 December 2008 at 4:14pm<br /><br />Similiar constellation - same problem...<br><br>I took a look at the grep sample (Samples\Utilities\Grep) and I think that the problem can also been seen there:<br><br>1.&nbsp; Add a new accelerator ( ID_APP_EXIT = 'Alt+Q' )<br>2.&nbsp; Compile and start the application<br>3.&nbsp; Click into the 'Find what' combo box so that it gets the input focus.<br>4a. Press 'Alt+F4' and the application quits<br>4b. Press 'Alt+Q' and nothing happens<br><br>Help !!!<br>]]>
   </description>
   <pubDate>Sun, 07 Dec 2008 16:14:24 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12694&amp;PID=43468&amp;title=menu-shortcuts-no-longer-works#43468</guid>
  </item> 
  <item>
   <title><![CDATA[Menu shortcuts no longer works : I have a SDI and a MDI application......]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12694&amp;PID=42903&amp;title=menu-shortcuts-no-longer-works#42903</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1337">BadJerry</a><br /><strong>Subject:</strong> 12694<br /><strong>Posted:</strong> 17 November 2008 at 10:12am<br /><br />I have a SDI and a MDI application... they both have (CFormView derived ) views which use CDialog derived child windows to display information.&nbsp; It's within these windows that the shortcuts don't work anymore.<DIV><DIV></DIV>The mainframe window is derived from CXTPMDIFrameWnd.</DIV><DIV>My dev environment is VC++ 6.0 SP6.</DIV><DIV>Is there anything else you need?</DIV><DIV>&nbsp;</DIV><DIV>Jerome</DIV>]]>
   </description>
   <pubDate>Mon, 17 Nov 2008 10:12:13 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12694&amp;PID=42903&amp;title=menu-shortcuts-no-longer-works#42903</guid>
  </item> 
  <item>
   <title><![CDATA[Menu shortcuts no longer works : Hi, not clear how you use CommandBars....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12694&amp;PID=42893&amp;title=menu-shortcuts-no-longer-works#42893</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 12694<br /><strong>Posted:</strong> 17 November 2008 at 9:01am<br /><br />Hi,<DIV>not clear how you use CommandBars.</DIV>]]>
   </description>
   <pubDate>Mon, 17 Nov 2008 09:01:15 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12694&amp;PID=42893&amp;title=menu-shortcuts-no-longer-works#42893</guid>
  </item> 
  <item>
   <title><![CDATA[Menu shortcuts no longer works : Since installing the commandbars...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12694&amp;PID=42882&amp;title=menu-shortcuts-no-longer-works#42882</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1337">BadJerry</a><br /><strong>Subject:</strong> 12694<br /><strong>Posted:</strong> 17 November 2008 at 7:25am<br /><br />Since installing the commandbars menu, Alt+F does not open the file menu in child dialog-boxes of a view... it works on the view itself...<DIV>All the keyboard accelerators are lost as well...</DIV><DIV>What can I do to make this work on all my dialog-boxes - ideally without too much work...</DIV><DIV>Thanks in advance,</DIV><DIV>Jerome</DIV>]]>
   </description>
   <pubDate>Mon, 17 Nov 2008 07:25:25 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12694&amp;PID=42882&amp;title=menu-shortcuts-no-longer-works#42882</guid>
  </item> 
 </channel>
</rss>