D
Dave C
Hi,
I have created an ActiveX control (derived from COleControl) designed to be
used within Infopath. The control is usable (marked safe for scripting etc)
and is quite happy to be dragged onto an Infopath form. The control has been
created using MFC in VC6.
This is all good, however I'm having problems with a couple of things:
1. I need to be able to fire an event within the control (a standard button
click will do just fine) - I can fire the event quite happily within the
control but Infopath does not believe this control can generate events - or
more specifically I cant select 'Edit Code' from the controls properties
whereas I can for a button. I have tried subclassing a BUTTON and generating
an ATL test control which supports events in VC7, neither will allow the
control to have events associated with it. I would quite happily manually
create and OnClick handler if I knew what to call it (what would the
identifier of my control?).
2. I'm getting no luck exposing a bindable data item (I've seen examples
suggesting the use of Value). The approach I have been trying is to create an
Automation item using the class wizard and make it bindable and visible to
the end user. This however, doesn't cause it to appear in the Infopath world.
If anyone has any ideas or has managed this I'd appreciate any suggestions.
Thanks,
Dave
I have created an ActiveX control (derived from COleControl) designed to be
used within Infopath. The control is usable (marked safe for scripting etc)
and is quite happy to be dragged onto an Infopath form. The control has been
created using MFC in VC6.
This is all good, however I'm having problems with a couple of things:
1. I need to be able to fire an event within the control (a standard button
click will do just fine) - I can fire the event quite happily within the
control but Infopath does not believe this control can generate events - or
more specifically I cant select 'Edit Code' from the controls properties
whereas I can for a button. I have tried subclassing a BUTTON and generating
an ATL test control which supports events in VC7, neither will allow the
control to have events associated with it. I would quite happily manually
create and OnClick handler if I knew what to call it (what would the
identifier of my control?).
2. I'm getting no luck exposing a bindable data item (I've seen examples
suggesting the use of Value). The approach I have been trying is to create an
Automation item using the class wizard and make it bindable and visible to
the end user. This however, doesn't cause it to appear in the Infopath world.
If anyone has any ideas or has managed this I'd appreciate any suggestions.
Thanks,
Dave