Registering Event Handlers for a Measurement Studio ActiveX Control Created at Runtime Causes First-Chance Exceptions Primary Software: Measurement Studio>>Visual C++ SupportPrimary Software Version: 6.0 Primary Software Fixed Version: 6.0 Secondary Software: N/A
Problem: When I register event handlers for a Measurement Studio ActiveX user interface control that was created dynamically at runtime, my events work, but the output window shows many first-chance exceptions occuring. Why is this happening? Solution: The first-chance exceptions occur when you do not have handlers defined for all the events associated with the control and can be safely ignored. The exceptions are usually "member not found" exceptions, since no handler was found for that particular event when it was raised. If you want to get rid of the exceptions, you will need to define handlers for all the events, even if you do not use them. These exceptions also occur if you do not define stock properties for the ActiveX control. These exceptions will not have any detrimental effects. This is standard MFC behavior. The example in the Related Links section demonstates how to register event handlers for dynamically created Measurement Studio ActiveX graph controls, but you can use it to set up similar operations for other Measurement Studio UI controls as well. Related Links: Registering Event Handlers for a Dynamically Created Measurement Studio Graph Control Attachments:
Report Date: 05/04/2006 Last Updated: 09/18/2007 Document ID: 3U2D6RQ6 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
