Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - set accelerators
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

set accelerators

 Post Reply Post Reply
Author
Message
bluesaphire View Drop Down
Newbie
Newbie
Avatar

Joined: 07 August 2006
Location: India
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote bluesaphire Quote  Post ReplyReply Direct Link To This Post Topic: set accelerators
    Posted: 24 August 2006 at 5:09am

hi,

i am setting the accelerators in my application using
 
pCommandBars->GetShortcutManager()->SetAccelerators(acceleratorID);
 
but how can i check at runtime whether the input shortcut key(given through keyboard by end user)is present in the accelerator table?
 
my requirement is something like first checking whether the key is present in the active accelerator table(say accelerator1),if not check in the second table(accelerator2) and take the action associated with it if any.
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2006 at 8:53am
Hi,
Catch WM_COMMAND and check if HIWORD(wParam) == 0x1
 
if (message == WM_COMMAND && HIWORD(wParam) == 0x1)
{
...
}
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
bluesaphire View Drop Down
Newbie
Newbie
Avatar

Joined: 07 August 2006
Location: India
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote bluesaphire Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2006 at 9:51am
 Thanks for the quick reciprocation Oleg
does codejock provide any functionality to check whether a particular accelerator is present in the accelerator table.(say ctrl+N is present in the table or not).
 
This would give the solution for the approach i have taken.
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 24 August 2006 at 10:51am
Hi,
 
No, doesn't :(
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
bluesaphire View Drop Down
Newbie
Newbie
Avatar

Joined: 07 August 2006
Location: India
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote bluesaphire Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2006 at 6:58am
hi,
 
what is the functionality associated with CompareAccelKey() method of the CXTPShortcutManager class.
i dont see any documentation nor find the usage of it in the samples.
 
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2006 at 7:53am
Hi,
It used internally only. Compre shortcut in string with pressed key.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
bluesaphire View Drop Down
Newbie
Newbie
Avatar

Joined: 07 August 2006
Location: India
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote bluesaphire Quote  Post ReplyReply Direct Link To This Post Posted: 28 August 2006 at 1:19am
Thanks Oleg
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.070 seconds.