Problem with Mnemonics of a Group box
-
We have a bug in our project, the problem is: There is a group box and inside the group box there are 2 radio buttons, all the three controls have mnemonics. When I give the shortcut for group box the focus shifts to the first radio button (because that’s the first control with tab stop) but when I give the short cuts for the 2 radio buttons, the focus shifts from one button to the other but the radio buttons remain unchecked. That is, which ever button is checked by default remains checked even when I give the shortcut for the other radio button but the focus is shifted. I proposed a solution to this by overriding the PreTranslateMessage() function and capturing the 2 shortcuts for the radio buttons and checking the appropriate radio buttons programmatically and un-checking the other radio button using CWnd::CheckDialogButton() function. However I couldn’t find the cause for this bug, I checked the Group and Tab Stop properties of the controls and tried changing these properties but still the mnemonics don’t work. I was wondering if anyone faced this problem before?!! Or if there’s a better way to fix this bug?!! Thanks, swathi