IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE
BEGIN
"A", ID_FILE_MENU1, VIRTKEY, CONTROL, NOINVERT
...
END
int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance
,LPSTR lpszCmdParam,int nCmdShow)
{
...
hWnd=CreateWindow(lpszClass,lpszClass,WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,
NULL,(HMENU)NULL,hInstance,NULL);
ShowWindow(hWnd,nCmdShow);
HACCEL hAccel;
hAccel = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDR_ACCELERATOR1));
while (GetMessage(&Message,NULL,0,0)) {
if (!TranslateAccelerator(hWnd, hAccel, &Message)) {
TranslateMessage(&Message);
DispatchMessage(&Message);
}
}
return (int)Message.wParam;
}