This example is an ATL application using the PTC Mathcad Prime API to exercise some fundamental methods and properties, and to demonstrate how to enable events. If you build this project, you must use BUILD and not REBUILD, as REBUILD removes the ptc.mathcadprime.automation.tlh and ptc.mathcadprime.automation.tli files from the RELEASE folder, so you will have to copy them back.
There are three main pieces of code:
• Main.cpp builds the user interface.
• MathcadPrimeComEvents2.cpp implements the methods of the MathcadPrimeComEvents2 class that tells PTC Mathcad Prime what to do on event.
• MathcadPrimeComClient.cpp implements callbacks for the ATL user interface.
The main routine instantiates a MathcadPrimeComClient, a generic class name for this example. During StarPrimeServer(), the callback creates a MathcadPrimeApplication3 and a MathcadPrimeComEvents2 object. These PTC Mathcad Prime objects are part of the API, and are the only two objects that you create with new.