<?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: Quickwin, Accelerator-Keys in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Quickwin-Accelerator-Keys/m-p/974614#M24766</link>
    <description>Of course you still have the ability to use &lt;ALT&gt;letter1letter2 where 'letter1' is the &lt;BR /&gt;letter preceded by '&amp;amp;' in the text tag of one of the main QUickWin window's menu item's and 'letter2' is the &lt;BR /&gt;letter preceded by '&amp;amp;' in a text tag in the drop-down menu that &lt;ALT&gt;letter1 opens.&lt;/ALT&gt;&lt;/ALT&gt;</description>
    <pubDate>Wed, 21 Nov 2001 18:34:37 GMT</pubDate>
    <dc:creator>isn-removed200637</dc:creator>
    <dc:date>2001-11-21T18:34:37Z</dc:date>
    <item>
      <title>Quickwin, Accelerator-Keys</title>
      <link>https://community.intel.com/t5/Software-Archive/Quickwin-Accelerator-Keys/m-p/974609#M24761</link>
      <description>How can I generate accelerator-keys in a Quickwin-Application &lt;BR /&gt;and &lt;BR /&gt;how can I generate "fly-out/pop-up"-Sub-Menus in a Quickwin-Application? &lt;BR /&gt;It would be no problem to generate the resources for it &lt;BR /&gt;but how can I use the accelerator- and menu-resources? &lt;BR /&gt; &lt;BR /&gt;many thanks &lt;BR /&gt;Burkhard Meyer</description>
      <pubDate>Tue, 20 Nov 2001 01:51:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Quickwin-Accelerator-Keys/m-p/974609#M24761</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2001-11-20T01:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: Quickwin, Accelerator-Keys</title>
      <link>https://community.intel.com/t5/Software-Archive/Quickwin-Accelerator-Keys/m-p/974610#M24762</link>
      <description>AFAIK classic accelerators are out in QuickWin. The best you could achieve is to subclass QuickWin windows and intercept WM_KEYDOWN.  &lt;BR /&gt; &lt;BR /&gt;As for popup menus, here's a code snippet from an actual app which adds popup sub-menus to a QuickWin menu. Note that you have to subclass the window containing the menu in order to catch WM_COMMAND messages from these items. &lt;BR /&gt; &lt;BR /&gt;&lt;PRE&gt; 
SUBROUTINE AdditionalMenus 
 
USE COMCTL 
USE MSFWIN 
USE MSFLIB 
USE REGISTRY 
 
IMPLICIT INTEGER(h-n) 
 
INCLUDE 'Resource.fd' 
 
CHARACTER*24::      szMenuName(0:3)=(/'&amp;amp;Topology Analyser&amp;#0;    'C,      &amp;amp; 
                                      '&amp;amp;Load Flow&amp;#0;            'C,      &amp;amp; 
                                      'State &amp;amp;Estimation&amp;#0;     'C/) 
CHARACTER*32::      szItemName(4,0:3)=                                  &amp;amp; 
                             (/'&amp;amp;Voltage level coloring&amp;#0;     'C,       &amp;amp; 
                               '&amp;amp;Area coloring&amp;#0;              'C,       &amp;amp; 
                               '&amp;amp;Feeder coloring&amp;#0;            'C,       &amp;amp; 
                               '&amp;amp;Energization coloring&amp;#0;      'C,       &amp;amp; 
                               '&amp;amp;Display options...&amp;#0;         'C,       &amp;amp; 
                               '&amp;#0;                            'C,       &amp;amp; 
                               '&amp;#0;                            'C,       &amp;amp; 
                               '&amp;#0;                            'C,       &amp;amp; 
                               '&amp;amp;Options...&amp;#0;                 'C,       &amp;amp; 
                               '&amp;amp;Show toolbar&amp;#0;               'C,       &amp;amp; 
                               '&amp;#0;                            'C,       &amp;amp; 
                               '&amp;#0;                            'C,       &amp;amp; 
                               '&amp;amp;Voltage quality&amp;#0;            'C,       &amp;amp; 
                               'Operation planning&amp;#0;          'C,       &amp;amp; 
                               '&amp;#0;                            'C,       &amp;amp; 
                               '&amp;#0;                            'C/) 
 
INTEGER,PARAMETER::     nItems(0:3)=(/4,1,2,4/) 
INTEGER,PARAMETER::     IDItem(4,0:3)=                                  &amp;amp; 
                        (/ID_BUTTON_PONAP,                              &amp;amp; 
                          ID_BUTTON_POGRA,                              &amp;amp; 
                          ID_BUTTON_POIZV,                              &amp;amp; 
                          ID_BUTTON_POSTA,                              &amp;amp; 
                          ID_BUTTON_TS,                                 &amp;amp; 
                          0,0,0,                                        &amp;amp; 
                          ID_BUTTON_ESTOPC,                             &amp;amp; 
                          ID_BUTTON_VREME,                              &amp;amp; 
                          0,0,                                          &amp;amp; 
                          ID_BUTTON_OPTIMALNINAPON,                     &amp;amp; 
                          ID_BUTTON_KVALITETNAPONA,                     &amp;amp; 
                          0,                                            &amp;amp; 
                          ID_BUTTON_OPPLAN/) 
 
hMenu=GetMenu(hFrame) 
hMenu1=GetSubMenu(hMenu,0) 
DO i=0,3 
      hAddMenu=CreatePopupMenu() 
      DO j=1,nItems(i) 
            iFlags=MF_BYPOSITION.OR.MF_STRING.OR.MF_ENABLED 
            IF (i.EQ.0 .AND. j.EQ.4) iFlags=IOR(iFlags,MF_CHECKED) 
            IF (i.EQ.3 .AND. j.EQ.3) iFlags=MF_BYPOSITION.OR.MF_SEPARATOR 
            iSt=AppendMenu(hAddMenu,iFlags,IDItem(j,i),LOC(szItemName(j,i))) 
!            iSt=SetM
enuItemBitmaps(hAddMenu,j-1,MF_BYPOSITION,hBojenjeBmp(j),hBojenjeBmp(j)) 
      END DO 
      iSt=ModifyMenu(hMenu1,i,MF_BYPOSITION.OR.MF_POPUP.OR.MF_STRING.OR.MF_ENABLED, &amp;amp; 
                     hAddMenu,LOC(szMenuName(i))) 
END DO 
 
END SUBROUTINE AdditionalMenus 
&lt;/PRE&gt; &lt;BR /&gt; &lt;BR /&gt;Note that in the sample menus are created at run-time using CreatePopupMenu. It's probably possible to use LoadMenu from resources, though I didn't try it. Actuall</description>
      <pubDate>Tue, 20 Nov 2001 21:39:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Quickwin-Accelerator-Keys/m-p/974610#M24762</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2001-11-20T21:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: Quickwin, Accelerator-Keys</title>
      <link>https://community.intel.com/t5/Software-Archive/Quickwin-Accelerator-Keys/m-p/974611#M24763</link>
      <description>...continued&lt;BR /&gt; &lt;BR /&gt;Note that in the sample menus are created at run-time using CreatePopupMenu. It's probably possible to use LoadMenu from resources, though I didn't try it. Actually, it adds four popup menus to the first four items of leftmost QuickWin submenu. nItems is number of items in each sub-submenu, szItemName names of items, IDItem are item IDs (added manually into .rc file, though any set of IDs will serve). hFrame is QW frame window (GetHWNDQQ(QWIN$FRAMEWINDOW)). As noted above, you'll need to subclass hFrame (SetWindowLong(GWL_WNDPROC)). If you're not familiar with it, you may refer to DFWIN samples or search for, say, GWL_WNDPROC in the Forum for few samples. You'll have to catch WM_COMMAND and test whether LOWORD(wParam) matches any of IDs assigned to menu. &lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;Jugoslav</description>
      <pubDate>Tue, 20 Nov 2001 21:42:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Quickwin-Accelerator-Keys/m-p/974611#M24763</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2001-11-20T21:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Quickwin, Accelerator-Keys</title>
      <link>https://community.intel.com/t5/Software-Archive/Quickwin-Accelerator-Keys/m-p/974612#M24764</link>
      <description>Thank you for your help. &lt;BR /&gt;I successfully created a popup-menu and "MyWndProc". &lt;BR /&gt;I receive the WM_COMMAND-Messages and the ID-No's for &lt;BR /&gt;the popup-menu-selection. Wonderful. &lt;BR /&gt;But I don't receive any WM_KEYDOWN-message in "MyWndProc" &lt;BR /&gt;to get the codes for accelerator-keys. &lt;BR /&gt;What could solve this problem?</description>
      <pubDate>Wed, 21 Nov 2001 08:43:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Quickwin-Accelerator-Keys/m-p/974612#M24764</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2001-11-21T08:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: Quickwin, Accelerator-Keys</title>
      <link>https://community.intel.com/t5/Software-Archive/Quickwin-Accelerator-Keys/m-p/974613#M24765</link>
      <description>The problem is that WM_KEYDOWN is sent to the window which has keyboard focus; in a QuickWin app that's usually a MDI child. However, that implies that you should subclass all child windows in order to have that effect.  &lt;BR /&gt; &lt;BR /&gt;A better method would be to use a keyboard hook for your application. Hooking is similar to subclassing, except that it works on a "higher level", i.e. it filters messages &lt;B&gt;before&lt;/B&gt; they reach any window in the application. The following hook watches for release of "Ctrl" key in windows hFrame and hChild and does something when it's released. You could easily adapt it by testing for different key(s) (see description of "KeyboardProc" in help). &lt;BR /&gt; &lt;BR /&gt;&lt;PRE&gt; 
!Of course, explicit interface for KeyboardProc here. 
hKbHook=SetWindowsHookEx(WH_KEYBOARD,LOC(KeyboardProc),NULL,0) 
 
!============================================================== 
INTEGER(4) FUNCTION KeyboardProc(nCode,wParam,lParam)  
!DEC$ATTRIBUTES STDCALL::      KeyboardProc 
 
USE DFWIN 
USE COMCTL 
USE GLOBALS 
USE REGISTRY 
 
IMPLICIT NONE 
 
INTEGER,INTENT(IN)::    nCode,wParam,lParam 
INTEGER::               hFocus 
LOGICAL::               bSt 
TYPE(T_POINT)::         PT 
 
INTEGER::               iEvent,  &amp;amp; 
                        nKey,    &amp;amp; 
                        iSt 
 
INCLUDE "Resource.fd" 
 
IF (nCode.LT.0) THEN 
      KeyboardProc=CallNextHookEx(hHook,nCode,wParam,lParam)  
      RETURN 
END IF 
 
!Bit 31 specifies transition state of the key 
nKey=wParam 
IF (IAND(lParam,ISHFT(1,31)) .NE.0) THEN 
      iEvent=WM_KEYUP 
ELSE 
      iEvent=WM_KEYDOWN 
END IF 
 
hFocus=GetFocus() 
IF ((hFocus.EQ.hFrame .OR. hFocus.EQ.hChild) .AND. iEvent.EQ.WM_KEYUP) THEN 
      SELECT CASE (wParam) 
      CASE (VK_CONTROL) 
            IF (PROMENA_ZUMA) THEN 
                  PROMENA_ZUMA=.FALSE. 
                  iSt=ReleaseCapture() 
                  CALL SetDefAppCursor() 
                  CALL Draw(Zum, -1. ,-1.) 
            END IF 
      END SELECT 
END IF 
 
KeyboardProc=CallNextHookEx(hKbHook,nCode,wParam,lParam) 
 
END FUNCTION KeyboardProc 
&lt;/PRE&gt; &lt;BR /&gt; &lt;BR /&gt;Note that, like with subclassing, hKbHook variable has to be globally saved and the hook has to CallNextHookEx so that it doesn't break existing hook system. &lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;Jugoslav</description>
      <pubDate>Wed, 21 Nov 2001 18:28:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Quickwin-Accelerator-Keys/m-p/974613#M24765</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2001-11-21T18:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: Quickwin, Accelerator-Keys</title>
      <link>https://community.intel.com/t5/Software-Archive/Quickwin-Accelerator-Keys/m-p/974614#M24766</link>
      <description>Of course you still have the ability to use &lt;ALT&gt;letter1letter2 where 'letter1' is the &lt;BR /&gt;letter preceded by '&amp;amp;' in the text tag of one of the main QUickWin window's menu item's and 'letter2' is the &lt;BR /&gt;letter preceded by '&amp;amp;' in a text tag in the drop-down menu that &lt;ALT&gt;letter1 opens.&lt;/ALT&gt;&lt;/ALT&gt;</description>
      <pubDate>Wed, 21 Nov 2001 18:34:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Quickwin-Accelerator-Keys/m-p/974614#M24766</guid>
      <dc:creator>isn-removed200637</dc:creator>
      <dc:date>2001-11-21T18:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: Quickwin, Accelerator-Keys</title>
      <link>https://community.intel.com/t5/Software-Archive/Quickwin-Accelerator-Keys/m-p/974615#M24767</link>
      <description>Thank you for your Help. &lt;BR /&gt;But still I couldn't make the solution for the accelerator keys work. &lt;BR /&gt;Using "hKbHook= SetWindowsHookEx(WH_KEYBOARD_LL,LOC(MyKbProc),NULL,0)" etc. was not successful. I don't receive any message in MyKbProc. What could be the problem? Many thanks, Burkhard</description>
      <pubDate>Fri, 21 Dec 2001 11:08:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Quickwin-Accelerator-Keys/m-p/974615#M24767</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2001-12-21T11:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: Quickwin, Accelerator-Keys</title>
      <link>https://community.intel.com/t5/Software-Archive/Quickwin-Accelerator-Keys/m-p/974616#M24768</link>
      <description>You should use WH_KEYBOARD, not WH_KEYBOARD_LL. WH_KEYBOARD_LL should be used for system-wide low-level hooks; WH_KEYBOARD is sufficient. Moreover, the routine that calls SetWindowsHookEx should have an knowledge that MyKbProc is local procedure somehow (do you use IMPLICIT NONE?). Maybe EXTERNAL would suffice -- I'm not sure -- I always use either INTERFACE blocks  &lt;BR /&gt;or MODULE association. &lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;Jugoslav</description>
      <pubDate>Fri, 21 Dec 2001 19:34:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Quickwin-Accelerator-Keys/m-p/974616#M24768</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2001-12-21T19:34:26Z</dc:date>
    </item>
  </channel>
</rss>

