PreTranslateMessage, how to check key combination like Ctrl+R
-
Hi, in my dialog the users want to change focus not by using the tab-key, instead they want to jump directly to the different controls using accelerators. Therefor i want to check the key combination in the PreTranslateMessage method, to set the focus. How can i check this, because i always get only one key in the pMsg->wParam variable and not the combination. Need some advise or another solution. TIA, Chris
-
Hi, in my dialog the users want to change focus not by using the tab-key, instead they want to jump directly to the different controls using accelerators. Therefor i want to check the key combination in the PreTranslateMessage method, to set the focus. How can i check this, because i always get only one key in the pMsg->wParam variable and not the combination. Need some advise or another solution. TIA, Chris
-
Hi, in my dialog the users want to change focus not by using the tab-key, instead they want to jump directly to the different controls using accelerators. Therefor i want to check the key combination in the PreTranslateMessage method, to set the focus. How can i check this, because i always get only one key in the pMsg->wParam variable and not the combination. Need some advise or another solution. TIA, Chris
Chris, this is a built-in feature of dialogs and doesn't require any code on your part. Just create a static control and put it next to the edit box, e.g.: P&rice: [edit box here] The &r will show up on the screen as an underlined "r". Make sure the static is right before the edit box in the tab order, and then pressing Alt-R will move the focus to the edit box. If you *really* have to support shortcut keys using Ctrl, not Alt, then you will have to do some code. But using Alt has been standard for years, so go with Alt.