<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Menu Short cuts in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Menu-Short-cuts/m-p/970675#M23840</link>
    <description>...just an additional remark -- accelerator IDs from resource accelerator table should be the same as corresponding menu IDs. In this case, a) you don't change any of WM_COMMAND handling code b) Windows automatically disables accelerator when menu item is grayed and vice versa. &lt;BR /&gt; &lt;BR /&gt;Jugoslav</description>
    <pubDate>Wed, 24 Oct 2001 20:21:00 GMT</pubDate>
    <dc:creator>Jugoslav_Dujic</dc:creator>
    <dc:date>2001-10-24T20:21:00Z</dc:date>
    <item>
      <title>Menu Short cuts</title>
      <link>https://community.intel.com/t5/Software-Archive/Menu-Short-cuts/m-p/970673#M23838</link>
      <description>I want to be able to access menu items by pressing a single key on the keyboard - say "M" for a "Move" command, rather than having to select the "Edit" then the "Move" menu items, or instead of using the "Move" button on the tool bar.  &lt;BR /&gt;  &lt;BR /&gt;How do I trap these keyboard characters in a Windows API project to achieve this?  &lt;BR /&gt;  &lt;BR /&gt;Thanks,  &lt;BR /&gt;David</description>
      <pubDate>Tue, 23 Oct 2001 22:50:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Menu-Short-cuts/m-p/970673#M23838</guid>
      <dc:creator>davidgraham</dc:creator>
      <dc:date>2001-10-23T22:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: Menu Short cuts</title>
      <link>https://community.intel.com/t5/Software-Archive/Menu-Short-cuts/m-p/970674#M23839</link>
      <description>It is straightforward to program 'accelerator keys' using Visual Fortran.  &lt;BR /&gt;Use the Resource Editor to create an 'accelerator table', defining key combinations for frequently-used menu items, and give it a name (e.g.'GENERIC') and then in your WInMain function add&lt;PRE&gt;  
character*100 lpszAcceltabname  
!  
lpszAcceltabname="Generic"C&lt;/PRE&gt;  &lt;BR /&gt;After registering your window class, load your  menu and accelerator table resources and create your main window&lt;PRE&gt;  
hmenu		= LoadMenu(hInstance, LOC(lpszMenuName))  
haccel		= LoadAccelerators(hInstance, LOC(lpszAcceltabname))  
ghInstance	= hInstance  
  
hWnd = CreateWindow(	lpszClassName,                      &amp;amp;  
                        lpszAppName,                           &amp;amp;  
                        INT(WS_OVERLAPPEDWINDOW),              &amp;amp;  
                        50,                         &amp;amp;  
                        50,                                     &amp;amp;  
                        800,                                   &amp;amp;  
                        575,                                   &amp;amp;  
                        NULL,                                  &amp;amp;  
                        hmenu,                                 &amp;amp;  
                        hInstance,                             &amp;amp;  
                        NULL                                   &amp;amp;  
                        )  
i = ShowWindow( hWnd, SW_SHOWNORMAL)  
ghWnd=hWnd&lt;/PRE&gt;  &lt;BR /&gt;then start your message loop and include a reference to the TranslateAccelerator function to trap keyboard accelerators&lt;PRE&gt;  
!  
! Start a message loop  
  
do while( GetMessage (mesg, NULL, 0, 0) .NEQV. .FALSE.)  
! look for accelerator key-strokes - returns TRUE if key-stroke found and processed  
!  do not process message further if accelerotor key processed  
if (TranslateAccelerator( hwnd, haccel, mesg).EQV. .FALSE.) THEN  
! process message if accelerator not used  
   i =  TranslateMessage( mesg )  
   i =  DispatchMessage( mesg )  
   ENDIF  
  
end do  
  
WinMain = mesg.wParam  
end  
&lt;/PRE&gt;  &lt;BR /&gt;HTH</description>
      <pubDate>Tue, 23 Oct 2001 23:54:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Menu-Short-cuts/m-p/970674#M23839</guid>
      <dc:creator>isn-removed200637</dc:creator>
      <dc:date>2001-10-23T23:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: Menu Short cuts</title>
      <link>https://community.intel.com/t5/Software-Archive/Menu-Short-cuts/m-p/970675#M23840</link>
      <description>...just an additional remark -- accelerator IDs from resource accelerator table should be the same as corresponding menu IDs. In this case, a) you don't change any of WM_COMMAND handling code b) Windows automatically disables accelerator when menu item is grayed and vice versa. &lt;BR /&gt; &lt;BR /&gt;Jugoslav</description>
      <pubDate>Wed, 24 Oct 2001 20:21:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Menu-Short-cuts/m-p/970675#M23840</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2001-10-24T20:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: Menu Short cuts</title>
      <link>https://community.intel.com/t5/Software-Archive/Menu-Short-cuts/m-p/970676#M23841</link>
      <description>Thanks for the reply - I was trying to use WM_KEYUP! &lt;BR /&gt; &lt;BR /&gt;I now have a resource table and have defined lpszAcceltabname - but when I make the call &lt;BR /&gt; &lt;BR /&gt;haccel=LoadAccelerators(hInstance,LOC(lpszAcceltabname)) &lt;BR /&gt; &lt;BR /&gt;I get the error - &lt;BR /&gt;The specified resource name cannot be found in the image file. &lt;BR /&gt; &lt;BR /&gt;I have not mistyped the accelerator name. Is there something I have missed? &lt;BR /&gt; &lt;BR /&gt;Thanks, David</description>
      <pubDate>Thu, 25 Oct 2001 17:54:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Menu-Short-cuts/m-p/970676#M23841</guid>
      <dc:creator>davidgraham</dc:creator>
      <dc:date>2001-10-25T17:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: Menu Short cuts</title>
      <link>https://community.intel.com/t5/Software-Archive/Menu-Short-cuts/m-p/970677#M23842</link>
      <description>I managed to fix it myself by forcing the resource ID number rather than the resource name:- &lt;BR /&gt; &lt;BR /&gt;haccel= LoadAccelerators(hInstance,MakeIntResource(127)) &lt;BR /&gt; &lt;BR /&gt;Thanks, David</description>
      <pubDate>Thu, 25 Oct 2001 23:38:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Menu-Short-cuts/m-p/970677#M23842</guid>
      <dc:creator>davidgraham</dc:creator>
      <dc:date>2001-10-25T23:38:14Z</dc:date>
    </item>
  </channel>
</rss>

