Menu

accelerators

2002-12-14
2012-09-26
  • Nobody/Anonymous

    Does anyone know of a good code sample for demonstratin accelerators? I've tried 2 so far and am unable to get them to compile.

     
    • Nobody/Anonymous

      If your talking about menu accelerators you have to do this.

      define (in WINAPI main) HACCEL hAccel;
      ...
      hAccel = LoadAccelerators(hInst, "MyMenu"); //where MyMenu is put the
      //name of your menu
      //put the rest of this code in your resource file
      MyMenu MENU
      {
      POPUP "&File"
      {
        MENUITEM "&Exit", IDM_EXIT
      }
      POPUP "&About"
      {
        MENUITEM "&About", IDM_ABOUT
      }
      }
      //finally the accelerators
      MyMenu ACCELERATORS
      {
      VK_F1, IDM_ABOUT
      VK_F2, IDM_EXIT
      }

       
    • Nobody/Anonymous

      Actually I'm trying to compile a sample from Planet Source Code. The code may be found at the following link:
      http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=3197&lngWId=3
      Any help will be appreciated.  I will gladly detail my efforts with anyone that can assist me in this effort.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.