<?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 : Virtual key use in CompareAccelKey</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Virtual key use in CompareAccelKey]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 04 Apr 2026 02:09:48 +0000</pubDate>
  <lastBuildDate>Fri, 09 Nov 2007 01:00:26 +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=8650</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[Virtual key use in CompareAccelKey : Hello,  Please patch first lines...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8650&amp;PID=28301&amp;title=virtual-key-use-in-compareaccelkey#28301</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 8650<br /><strong>Posted:</strong> 09 November 2007 at 1:00am<br /><br />Hello,<DIV>&nbsp;</DIV><DIV>Please patch first lines of CompareAccelKey method:</DIV><DIV>&nbsp;</DIV><DIV>BOOL CXTPShortcutManager::CompareAccelKey(TCHAR chAccel, UINT wParam)<BR>{<BR>&nbsp;if (wParam &gt;= VK_NUMPAD0 &amp;&amp; wParam &lt;= VK_NUMPAD9)<BR>&nbsp;&nbsp;return (UINT)chAccel == (wParam + '0' - VK_NUMPAD0);</DIV><DIV>...</DIV><DIV>&nbsp;</DIV><DIV>and rebuild toolkit.</DIV><DIV>&nbsp;</DIV><DIV>Thanks.</DIV>]]>
   </description>
   <pubDate>Fri, 09 Nov 2007 01:00:26 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8650&amp;PID=28301&amp;title=virtual-key-use-in-compareaccelkey#28301</guid>
  </item> 
  <item>
   <title><![CDATA[Virtual key use in CompareAccelKey : As I was working with some of...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8650&amp;PID=28277&amp;title=virtual-key-use-in-compareaccelkey#28277</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3450">scdotss</a><br /><strong>Subject:</strong> 8650<br /><strong>Posted:</strong> 08 November 2007 at 4:19pm<br /><br />As I was working with some of the sample apps looking to add some additional functionality to our product, I simply added one '&amp;1' shortcut to a menu item that previously had none.<br><br>And I was able to reproduce this defect. I can use the ALT-F to get the file menu, then '1' using the upper keyboard '1' key. But am unable to get the item to fire using the numeric keypad. I've seen this on many computers here at our offices.<br><br>I believe it is a bug in the Toolkit. Is there any way to find out some resolution of this?<br><br>Thanks!<br>]]>
   </description>
   <pubDate>Thu, 08 Nov 2007 16:19:04 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8650&amp;PID=28277&amp;title=virtual-key-use-in-compareaccelkey#28277</guid>
  </item> 
  <item>
   <title><![CDATA[Virtual key use in CompareAccelKey : Yes, we use English as a language....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8650&amp;PID=28094&amp;title=virtual-key-use-in-compareaccelkey#28094</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3450">scdotss</a><br /><strong>Subject:</strong> 8650<br /><strong>Posted:</strong> 05 November 2007 at 11:07am<br /><br />Yes, we use English as a language. <DIV>&nbsp;</DIV><DIV>I've seen this not only on my computers (Vista, and XP) but others in our company have also seen it (and reported the actions as a defect to me).</DIV><DIV>&nbsp;</DIV><DIV>Strange that it would work for you. Do you have a small test application that I could build and run on this machine to see if there are any differences?</DIV><DIV>&nbsp;</DIV><DIV>Thanks!</DIV>]]>
   </description>
   <pubDate>Mon, 05 Nov 2007 11:07:46 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8650&amp;PID=28094&amp;title=virtual-key-use-in-compareaccelkey#28094</guid>
  </item> 
  <item>
   <title><![CDATA[Virtual key use in CompareAccelKey : Hello,  Strange it works for...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8650&amp;PID=28065&amp;title=virtual-key-use-in-compareaccelkey#28065</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 8650<br /><strong>Posted:</strong> 05 November 2007 at 1:55am<br /><br />Hello,<DIV>&nbsp;</DIV><DIV>Strange it works for me.&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>What Locale do you have?&nbsp; Do you use English input language ?</DIV>]]>
   </description>
   <pubDate>Mon, 05 Nov 2007 01:55:31 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8650&amp;PID=28065&amp;title=virtual-key-use-in-compareaccelkey#28065</guid>
  </item> 
  <item>
   <title><![CDATA[Virtual key use in CompareAccelKey : Here&amp;#039;s the situation - We...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=8650&amp;PID=28033&amp;title=virtual-key-use-in-compareaccelkey#28033</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3450">scdotss</a><br /><strong>Subject:</strong> 8650<br /><strong>Posted:</strong> 02 November 2007 at 4:36pm<br /><br />Here's the situation - We add items to the File menu for the last 9 Most Recently Used file (MRU), with shortcuts of 1,2....<DIV>&nbsp;</DIV><DIV>If I hit the Alt-F + the 1 key from the main keyboard (above the Q), it will use the file name of the first item in the MRU.</DIV><DIV>&nbsp;</DIV><DIV>But, if I hit the Alt-F + the 1 key from the numeric keypad, it will not do anything.</DIV><DIV>&nbsp;</DIV><DIV>Tracking it down, it looks like there might be a problem in CXTPShortcutManager::CompareAccelKey(). </DIV><DIV>&nbsp;</DIV><DIV>&nbsp;TCHAR tchVirtualKey = (TCHAR)MapVirtualKey(wParam, 2);<BR>&nbsp;if (tchVirtualKey == NULL)<BR>&nbsp;&nbsp;return FALSE;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;TCHAR chAccelUpper = ToUpper(chAccel);</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;if ((chAccel == (TCHAR)wParam) || (chAccelUpper == (TCHAR)wParam))<BR>&nbsp;&nbsp;return TRUE;<BR></DIV><DIV>What I see is that the numeric keypad '1' is correctly mapped from a virtual key to the '1' character. But, this mapped value is never used for comparisons in the code, it always compares against the actual key that comes in. Thus the 1 key on the numeric keypad will never activate our MRU item.</DIV><DIV>&nbsp;</DIV><DIV>If I add:</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;if ((chAccel == tchVirtualKey ) || (chAccelUpper == tchVirtualKey ))<BR>&nbsp;&nbsp;return TRUE;</DIV><DIV>&nbsp;</DIV><DIV>then it seems to work OK for both the '1' key and the numeric&nbsp;keypad '1' key.</DIV><DIV>&nbsp;</DIV><DIV>Is this a bug?<BR>&nbsp;</DIV>]]>
   </description>
   <pubDate>Fri, 02 Nov 2007 16:36:12 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=8650&amp;PID=28033&amp;title=virtual-key-use-in-compareaccelkey#28033</guid>
  </item> 
 </channel>
</rss>