Hot keys in MSVC++6.0

Ok.  I's using MSVC++6 and I have developed a dialog based application (via AppWizard).  On one of my dialogs, I want to enable it so that I can press F6, and it will perform and action (e.g. popup another dialog, save registry settings, etc.)  How do I do this?  Thanks!
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Override the PreTranslateMessage() and insert the following code to trap the F6 key:

if (pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_F6)
  ; // Do what you want to do

Good Luck,

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mgonyeaAuthor Commented:
Where is the PreTranslateMessage function?  Is there a WM_<EVENT> associated with it?

mgonyeaAuthor Commented:
Oh I got it!  Sorry about that.  Wasn't thinking...probably too much drug and alcohol abuse or something... ;-)

Thanks again!
Hey, ummm im trying to do something simular, but with the scroll lock key, and numbers combination. Using visual .net

I have a dialog box with two buttons, when i click the left one, its supposed to perform the key combo ect... but i must use the scroll lock key, and it doesnt have an ascii code or anything :(

If you could help at all, that would be great.
Open up a new question... no biggy-backing :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.