Link to home
Start Free TrialLog in
Avatar of Mindo
Mindo

asked on

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.
ASKER CERTIFIED SOLUTION
Avatar of Vinayak Kumbar
Vinayak Kumbar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mindo
Mindo

ASKER

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