Tuesday, February 07, 2012
help to transfer C# codes as following to C++ codes?
Last Post 24 Aug 2010 10:12 PM by assassin. 1 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
assassinUser is Offline
New Member
New Member
Posts:94

--
23 Aug 2010 10:34 PM  

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

assassinUser is Offline
New Member
New Member
Posts:94

--
24 Aug 2010 10:12 PM  
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!
You are not authorized to post a reply.

Active Forums 4.2
Copyright © 2011 JasonNewell.NET