CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2002
    Location
    Montreal, Canada
    Posts
    14

    accelerator keystrokes

    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.
    Thx.

  2. #2
    Join Date
    Sep 2003
    Posts
    815
    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...

    Avi

  3. #3
    Join Date
    May 2002
    Location
    Montreal, Canada
    Posts
    14
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured