jsiegendorf
January 20th, 2005, 11:33 AM
I am still relatively new to C++ so I'm not sure how easy or difficult this is. I am using Visual C++ .NET to make a program that recieves events from another software program which has an ActiveX API interface. I add the reference to the library but I am not sure what to do next. I am able to do this easily in C# or VB.NET, so I can't believe its that much more difficult. Here it is in C#...can someone tell me what I need to change for C++?
public class Form1 : System.Windows.Forms.Form
{
private SterlingLib.STIOrderMaint stiMaint = new SterlingLib.STIOrderMaint();
public Form1()
{
// Required for Windows Form Designer support
InitializeComponent();
// Add STI event handlers
stiEvents.OnSTIOrderReject +=
new SterlingLib._ISTIEventsEvents_OnSTIOrderRejectEventHandler(OnSTIOrderReject);
...
private void OnSTIOrderReject(ref SterlingLib.structSTIOrderReject structReject)
{
lbMsgs.Items.Insert(0, " - STIOrderReject" + " - RejectReason = " + structReject.nRejectReason);
}
public class Form1 : System.Windows.Forms.Form
{
private SterlingLib.STIOrderMaint stiMaint = new SterlingLib.STIOrderMaint();
public Form1()
{
// Required for Windows Form Designer support
InitializeComponent();
// Add STI event handlers
stiEvents.OnSTIOrderReject +=
new SterlingLib._ISTIEventsEvents_OnSTIOrderRejectEventHandler(OnSTIOrderReject);
...
private void OnSTIOrderReject(ref SterlingLib.structSTIOrderReject structReject)
{
lbMsgs.Items.Insert(0, " - STIOrderReject" + " - RejectReason = " + structReject.nRejectReason);
}