U can catch WM_HOTKEY just like you did BN_CLICKED.
The WPARAM with WM_HOTKEY contains the id of hotkey
(the second parameter of RegisterHotKey, while
registring the hotkey) with which you can idenfiy
it and process it
int Id = (int)wp;
if (Id != KEYID)
{
AfxMessageBox("Not Caught");
return 1;
}
AfxMessageBox("Caught");
return 0;
Regards
Ankur Verma
|