ActiveX control keyboard messages

I'm writing a button ActiveX control. Is there a way to receive keyboard messages when my control isn't in the focused state? For example, to get the WM_KEYDOWN message when my ActiveX control isn't in user focus.
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.

Vinayak KumbarSr Program ManagerCommented:

I dont think. Why u need to trap the key down message when focus is not there?


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
MindoAuthor Commented:
Why would i need? I'm creating a button control. The standard button control has a Default property, which means that if the ENTER key is pressed in the dialog, the button can receive it and close the dialog or do any actions the user wants. I want to implement this property - my colleagues require it.

By the way, i can get the mouse events when my control isn't in focus. I use the SetCapture() and ReleaseCapture() functions.

I guess you have to do that in the container. When you design with standard button controls, you assign them IDs and accelerator handles the keyboard-to-button mapping.
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
System Programming

From novice to tech pro — start learning today.