Click to See Complete Forum and Search --> : accelerators! How can I control them? Help! Help! HELP!


Danielle Harvey
May 14th, 1999, 05:09 PM
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.

Jaeyeon Lee
May 14th, 1999, 10:11 PM
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 ?