Backspace problem in ActiveX embeded in IE
-
Hi Gurus, I have an ActiveX control that has an Edit control inside. I have embeded this control in IE. the problem is when i try to delete some text in Edit control using backspace key the browser takes me to the previous page instead of Erasing the text in Edit control. Does any one know how to deal with this situation please its urgent thanks Muhammad Azam
-
Hi Gurus, I have an ActiveX control that has an Edit control inside. I have embeded this control in IE. the problem is when i try to delete some text in Edit control using backspace key the browser takes me to the previous page instead of Erasing the text in Edit control. Does any one know how to deal with this situation please its urgent thanks Muhammad Azam
-
I think it is because the browser gets the events first.
Subclass
the Edit control, and you are good to go. this is this.Khan, could you please ellaborate your point. I am not able to get it. My ActiveX control contains other controls along with the Edit control. AZam
-
Khan, could you please ellaborate your point. I am not able to get it. My ActiveX control contains other controls along with the Edit control. AZam
I meant that you could
subclass
it. Which basically means implementing theWndProc
for the control. The actual code would depend on whether you are using MFC or not. In MFC, it is really easy, as you could just derive a class from CEdit. Then in that class, you can control everything the edit control does, like, handling backspace, Esc etc. In WTL, it is just a little different. Search this site for the many edit controls: http://www.codeproject.com/editctrl/[^] Here, you will find many implementations. Choose the best one for your purpose. this is this.