Very strange behavior in ActiveX control, pleas help
-
I've cross posted this into the C++ forum, cause a) it didn't get answered in the COM forum, b) the most knowledgeable people seem to hang out here. This problem was presented to me by a co-worker. It really has me stumped. In our shop we utilize an application generator "Cool Plex". It builds C++ code and compiles it into dlls. One of its abilities is to include ActiveX controls on a screen. We have written an ActiveX control that dynamically creates a form using Combo box, ListBox and Ms MaskEdBox control. A typical usage might include 2 or 3 instances of each. The Problem: Inside our ActiveX we capture the Tab key in each control (control_OnKeyUp) and set focus to the next control, except for the MaskedEdit controls. We get other keys in the KeyUp event, but not the Tab key!!?? If I create a VB app and embed the control in it, the tabbing works as normal, So far, even worse. Now it appears the PLEX generated application is inhibiting the Tab key from getting to the MaskedEdit control which is encapsulated in our ActiveX control. Other encapsulated controls seem to work fine. It seems to me that these symptoms are mutually exclusive. I don't see how this is possible, but the developer on this project has convinced me that this is what is happening. 1. PLEX container passes (or never gets) Tab key presses to the ActiveX control. 2. PLEX container inhibits the Tab key when the focus inside the ActiveX control is in a MaskedEdit control. 3. I believe the encapsulated control with the focus, gets the events before PLEX, precluding inhibiting the tab key at all. 4. PLEX container has no way to differentiate the encapsulated control with the focus from any other. 5. PLEX container has no way to differentiate the type of control. How could it know that the focus in our Activex control is on a MaskEdBox? Thanks for the help, Bill Thanks for the help, Bill