Keyboard focus to ActiveX control
-
Hi I am trying to develop an activex control. The control has methods to respond to the WM_KEYDOWN messages and in the test container these seem to be working but when a put the control on a dialog window the control doesn't seem to get the focus - seems to remain with the dialog window as the OK and cancel buttons flash wildly when I press the up and down keys. How can I get the messages through to the control. Thanks Andrew Hoole
-
Hi I am trying to develop an activex control. The control has methods to respond to the WM_KEYDOWN messages and in the test container these seem to be working but when a put the control on a dialog window the control doesn't seem to get the focus - seems to remain with the dialog window as the OK and cancel buttons flash wildly when I press the up and down keys. How can I get the messages through to the control. Thanks Andrew Hoole
What framework (if any) are you using? ATL, MFC? Steve
-
Hi I am trying to develop an activex control. The control has methods to respond to the WM_KEYDOWN messages and in the test container these seem to be working but when a put the control on a dialog window the control doesn't seem to get the focus - seems to remain with the dialog window as the OK and cancel buttons flash wildly when I press the up and down keys. How can I get the messages through to the control. Thanks Andrew Hoole
-
Hi I am trying to develop an activex control. The control has methods to respond to the WM_KEYDOWN messages and in the test container these seem to be working but when a put the control on a dialog window the control doesn't seem to get the focus - seems to remain with the dialog window as the OK and cancel buttons flash wildly when I press the up and down keys. How can I get the messages through to the control. Thanks Andrew Hoole
Hi I have solved my problem by making my control handle the WM_GETDLGCODE and forcing it to return DLGC_WANTARROWS|DLGC_WANTALLKEYS|DLGC_WANTCHARS; Still to discover if this has further consequences. Andrew Hoole
-
What framework (if any) are you using? ATL, MFC? Steve
Sorry. I am using Visual C++ 6 and MFC. Andrew
-
Does the control receive the focus and then
WM_KEYDOWN
messages if you first click it with the mouse?No the control is handle mouse message just fine but even after clicking in the window several times the key messages don't get through. See my further post regarding how I might have fixed it. My concern now is if I have several of these controls on a dialog which one will respond to the messages. Andrew