in WinMain, LoadAccelerators function always return a null handle hAccel ???????
// main.cpp
// before messageloop
...
...
// Loading of keyboard accelerators
hAccel = LoadAccelerators(hInst, (LPCTSTR)"MyAccel");
if (!hAccel) MessageBox(NULL, "The accelerator table was not loaded", "", MB_OK);
while (GetMessage(&msg, NULL, 0, 0))....
......
......
Hi All
in WinMain, LoadAccelerators function always return a null handle hAccel ???????
// main.cpp
// before messageloop
...
...
// Loading of keyboard accelerators
hAccel = LoadAccelerators(hInst, (LPCTSTR)"MyAccel");
if (!hAccel) MessageBox(NULL, "The accelerator table was not loaded", "", MB_OK);
while (GetMessage(&msg, NULL, 0, 0))....
......
......
// resource.rc
....
POPUP "&File"
{
MENUITEM "Q&uit", IDM_FILE_EXIT
}
...
...
MyAccel ACCELERATORS DISCARDABLE
{
"G", IDM_FILE_EXIT,CONTROL, VIRTKEY
}
is the resource file actually compiled and linked in?
Quite often any resource files you add to your project don't get linked by default. You can change that in Project Options, tab Files
sorry correct link is
http://macgile.free.fr/LoadAccelerators.zip
Macgile
Hi all
Thank's
1)
is the resource file actually compiled and linked in?
Yes
2)
Quite often any resource files you add to your project don't get linked by default. You can change that in Project Options, tab Files
All file is linked and appear in file tab
You can download project to
http://macgile@macgile.free.fr/LoadAccelerators.zip
Macgile