Hi,
I have an unhandled exception error when I exit my program. I am using Visual C++.NET and current I want to put the AxCWButton object in my windows form. What is weird is when I exit my program, there is a null reference exception when
System.Windows.Forms.IOleInPlaceObject.UIDeactivate() is called. I am unfamilar with the internals so I do not the significance of this method.
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Windows.Forms.IOleInPlaceObject.UIDeactivate()
If I remove the AxCWbutton, my program exits fine. The null reference exception only occurs when I add the button to my form. I did not change any code, and used the automatic referencing style visualc++.NET uses when adding any objects
onto a form. Any help would be greatly appreciated. Thanks!
I declare the object like so in my forms.h:
private
: AxInterop::CWUIControlsLib::AxCWButton * button1;