Using the resource editor, i have created a few accelerator keys...However the problem is that the accelerator keys will only work if the CMainFrame class is in focus. If i have invoked another dialog box (another class) and that dialog box is now in focus, the accelerator keys cannot work because the message generated by pressing the Accelerator keys are send to the dialog in focus instead of the CMainFrame class.

Is there a way to solve this problem so that the Accelerator Keys can work even though the CMainFrame class is not in focus?