Accelerators (Again) |
Post Reply |
Author | |
Simon HB9DRV
Senior Member Joined: 07 July 2005 Location: Switzerland Status: Offline Points: 458 |
Post Options
Thanks(0)
Posted: 03 November 2006 at 6:07am |
Brilliant - my brand new program displays the accelerators (F1 - F5 and F8) in menus and toolbars but they don't work - pressing F8 has no effect.
Another program works well. Any ideas? I use a standard Accelerator table in Visual Studio 6.0 and am slowly going crazy :-) It makes no difference at all when I add the line below: pCommandBars->GetShortcutManager()->SetAccelerators(IDR_MAINFRAME); |
|
Simon HB9DRV
|
|
rmercer
Groupie Joined: 22 February 2006 Status: Offline Points: 34 |
Post Options
Thanks(0)
|
I experienced a similar issue caused by my override of CMainFrame::PreTranslateMessage.
My return was: CFrameWnd::PreTranslateMessage(pMsg);
when it should have been: CXTPFrameWnd::PreTranslateMessage(pMsg);
Example:
BOOL CMainFrame::PreTranslateMessage(MSG* pMsg)
{
return CXTPFrameWnd::PreTranslateMessage(pMsg);
}
As soon as I fixed it to match the class I was actually using, the accelerator keys worked perfectly.
Perhaps your issue is the same as mine?
|
|
Simon HB9DRV
Senior Member Joined: 07 July 2005 Location: Switzerland Status: Offline Points: 458 |
Post Options
Thanks(0)
|
Thanks - spot on!
|
|
Simon HB9DRV
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |