Reply

help to transfer C# codes as following to C++ codes?

[ Edited ]

 

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!"); }

    }

}

 

Posted by: assassin 007
Post date: 8/23/2010 5:34:01 PM

1 REPLY

RE: help to transfer C# codes as following to C++ codes?

[ Edited ]

Somebody can help me?

 

I have to add a ATL simple object to the project to listening the application event Now. But I want to realize the function with simple C++ codes. Not MFC.

 

Please help me, thanks!

 

Posted by: assassin 007
Post date: 8/24/2010 5:12:54 PM