January 29th, 2004, 08:38 AM
Has anyone seen this?
My window is a modal dialog with various buttons on it. In the caption for the buttons, I specify & before the character that I want so that when ALT + that character are pressed, the button click responds.
This works except that my problem is I don't need to press ALT in order for the action to take place. For example, with my button &Translate, just pressing 'T' triggers the event. This is something I don't want.
I tried adding an accelerator table but I still have the same problem.
I am using Microsoft Visual C++ 2003 version 7.1
If anyone has feedback on this, please let me know.
January 29th, 2004, 09:20 AM
I don't have the answer for you, but After reading your thread
I added key strokes to one of my dialog based application, and I have the same behaviour,
it wasn't like that when I used VC6, are you using VC.NET (that's what I use) maybe it's a feature...
January 29th, 2004, 10:00 AM
Yes, I have MS Visual C++.net.
The only way I am able to work around the problem is to capture the keystroke in PreTranslateMessage.
However, I don't find this is the best way to do it and I would like to understand what is happening.
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.