[solved] BeforeAdd Id parameter 2-byte integer |
Post Reply |
Author | |
wrecks
Groupie Joined: 14 July 2015 Status: Offline Points: 42 |
Post Options
Thanks(0)
Posted: 03 April 2017 at 7:59am |
For a Codejock CommandBars 17.2 Ribbon, I have been using numbers like 12300004 as my control Id numbers. Everything is working fine until I tried to implement the Customize Keyboard facility. When the BeforeAdd event fires, I get an Id of 44772, which did not match any of my Ids, and had no effect when I passed it along to KeyBindings.Add. Now I realize that 44772 is the lower 2 bytes of 12300004 !
Can you confirm that this is correct? So I must use Id numbers < 65536 ? Also, the BeforeAdd event Control, Shift, and Alt flags are unexpected.
For example, if I press Alt+0, I get fVirt=17 and Key=48. The way I read the documentation, I was expecting fVirt=16. Can you explain the extra 1 ? |
|
olebed
Admin Group Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(0)
|
17 is
You should use bit-wise operations with fVirt variable. |
|
wrecks
Groupie Joined: 14 July 2015 Status: Offline Points: 42 |
Post Options
Thanks(1)
|
Thank you, Oleksandr. For your next release, maybe you could add that information to the help file. Right now it only shows:
Can you comment on the short integer ID codes? Is that a bug?
|
|
olebed
Admin Group Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(0)
|
Hello,
There is a real bug with getting only last 2 bytes from control ID. And only in CXTPCustomizeKeyboardPage::OnAssign() method. In other places used whole ID. I've fixed this. Thank you for bringing this to our attention. Hot fix for MFC version:
Regards, Oleksandr Lebed |
|
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 |