ActiveX controls in Internet Explorer
-
Hi, I'm creating an ActiveX control to be embedded into a web page. This control contains a child dialog with a number of controls in it. The problem is that certain key presses are not received by this child dialog, specifically, TAB, cursor keys and (importantly) Backspace. I understand that certain key presses such as TAB and cursor keys require PreTranslateMessage to be overridden in the COleControl derived class. I have done this. I also know that I should be calling LockInPlaceActive on the control when it is activated so that I can capture these WM_KEYDOWN messages, but when I debug this control when it is embedded into a web page (and viewed in Internet Explorer), LockInPlaceActive always returns FALSE. Does Internet Explorer disallow in place active? Is there any way that pressing Backspace in a child Edit control of the ActiveX control will actually edit the text rather than returning to the previous web page? Thanks in advance. Derek Waters
-
Hi, I'm creating an ActiveX control to be embedded into a web page. This control contains a child dialog with a number of controls in it. The problem is that certain key presses are not received by this child dialog, specifically, TAB, cursor keys and (importantly) Backspace. I understand that certain key presses such as TAB and cursor keys require PreTranslateMessage to be overridden in the COleControl derived class. I have done this. I also know that I should be calling LockInPlaceActive on the control when it is activated so that I can capture these WM_KEYDOWN messages, but when I debug this control when it is embedded into a web page (and viewed in Internet Explorer), LockInPlaceActive always returns FALSE. Does Internet Explorer disallow in place active? Is there any way that pressing Backspace in a child Edit control of the ActiveX control will actually edit the text rather than returning to the previous web page? Thanks in advance. Derek Waters
You need to implement IInputObject to receive those keystrokes. Search for IInputObject in MSDN - I know I've come across at least one article that describes how to do what you want. --Mike-- http://home.inreach.com/mdunn/ "Holding the away team at bay with a non-functioning phaser was an act of unmitigated gall. I admire gall." -- Lt. Cmdr. Worf
-
You need to implement IInputObject to receive those keystrokes. Search for IInputObject in MSDN - I know I've come across at least one article that describes how to do what you want. --Mike-- http://home.inreach.com/mdunn/ "Holding the away team at bay with a non-functioning phaser was an act of unmitigated gall. I admire gall." -- Lt. Cmdr. Worf
Thanks Michael, I actually found that Knowledge Base article "Q168777 - PRB: MFC ActiveX Control in IE Doesn't Detect Keystrokes" helped (with a bit of fiddling). Derek.