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
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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
}
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.