CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Posts
    327

    accelerators! How can I control them? Help! Help! HELP!

    I created the accelerator ctrl-H. How can I control when it
    takes affect? For example, if the user has the cursor placed
    in an edit box, say IDC_EDIT1, and hits ctrl-H, how can I
    have this combination pop-up a dialog box. And if the user is
    in edit box IDC_EDIT2 and hits ctrl-H, how can I have this
    combination pop-up a different dialog box?

    Any response any one can give me will be greatly appreciated.


  2. #2
    Join Date
    May 1999
    Location
    Republic of Korea
    Posts
    74

    Re: accelerators! How can I control them? Help! Help! HELP!

    Why not handle the situation in your accellerator message handler ?
    That is, if Ctrl-H is pressed, your accellerator maps it to some message.
    Inside the message handler, you may be able to check if the cursor is in IDC_EDIT1 or IDC_EDIT2.
    Then you can call appropriate dialog.
    Am I correct ?




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