Dear Jason, please help me to transfer c# codes of Application Events to c++ codes? Thanks!
using System;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace AppEventsCSharp
{
public partial class Form1 : Form
{
private SolidEdgeFramework.Application SEApp ;
private SolidEdgeFramework.ISEApplicationEvents_Event AppEvents;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
SEApp = Marshal.GetActiveObject("SolidEdge.Application")
as SolidEdgeFramework.Application;
AppEvents = (SolidEdgeFramework.ISEApplicationEvents_Event)SEApp.ApplicationEvents;
AppEvents.BeforeCommandRun+=new SolidEdgeFramework.ISEApplicationEvents_BeforeCommandRunEventHandler(AppEvents_BeforeCommandRun);
}
void AppEvents_BeforeCommandRun(int theCommandID)
{ MessageBox.Show("Command will run!"); }
}
}