I've got a feeling this is not too difficult, but it's got me stumped.
I have 2 pieces of code that work for me, but work independently as follows:
This allows a user to press a combination of keys and have the control display the chosen key combination, converting it to a KeyCode and Shift combination
This allows Multiple HotKeys to be set up in a single
application, with each key assigned a different function.
Now, the issue is that in 2. above the HotKeys to be set up are 'hard-coded' for example:
retVal0 = RegisterHotKey(Me.hwnd, 0, MOD_CTRL, VK_F10)
' This sets up HotKey CTRL+F10
retVal1 = RegisterHotKey(Me.hwnd, 1, MOD_CTRL, VK_F11)
'This sets up HotKey CTRL+F11
retVal2 = RegisterHotKey(Me.hwnd, 2, MOD_CTRL, VK_F12)
'This sets up HotKey CTRL+F12
BUT, I want to be able to register a user-selected HotKey (ie to use any HotKey selected by user in code 1. above). How would I reference the user-selected HotKey in the RegisterHotKey commands in code 2.?
When I press CTRL F10 in 1. above, it returns 'Keycode: 121 Shift: 2'. What does that mean? How does this Keycode and Shift value relate to 'MOD_CTRL' and 'VK_F10' in 2.? What is the translation?
Hope this makes sense.