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.
LVL 2
MindoAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Vinayak KumbarConnect With a Mentor Sr Program ManagerCommented:
Hi,

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

VinExpert
0
 
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.

Thanks.
0
 
xu092098Commented:
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.
0
All Courses

From novice to tech pro — start learning today.