Based on a MFC sample called VisualStudioDemo, I have modified the active view to embedded the MFC Scintilla wrappers provided by http://www.naughter.com/scintilla.html. It is not very complicated because the wrappers are directly useful. Now I have to exploit the solution docking pane, and allow to build something. I think I will allow this app to run the C# compiler. I need to think about it…
In the October 2017 edition of french magazine Programmez, I have written an article about Why C++ in 2007 ?
The question is answered by Herb Sutter…
I have a new exciting challenge in Paris. I will work for a popular Microsoft Gold Partner : Neos-SDI.
One of my challenge @Microsoft was about native development for debugging a large C++/MFC application. The customer had paid for a large contract (25 days). I have done the job. I found the bugs after serveral trip to the customer’s location in south of France. The customer was satisfied. I also had .NET missions with code review, audit, performance enhancements, data access problems with EF, SQL Server audit. The job of PFE was very exciting, very technical but it is over.
To manipulate the data about methods, fields and properties, I have to call the .NET assembly i have created. I just make a reference to this .dll only if my app supports the /clr compiler option.
Here are the structure of the data I will get from .NET assembly:
The method that is linked to the Ribbon icon “Import .NET Module” is shown below. I just call the CFileDialog to choose an assembly and then I call the .NET code. As you can see, the .NET code is called using C++/CLI with the ^(hat) symbol to define objects. In the .NET C# mode you don’t see it is a pointer to an object but in C++/CLI you have to declare it with the specific syntax. Once the method is called, I just take every data and put it in C++ classes.
Here is the code:
My modeler2 application has the feature of importing .NET module. It dumps types, properties and fields. It is not finished but it works !
The C++ application support the /clr option of the compiler. It allows to load .NET assemblies and access it. My C# dll exports a class who uses Reflection to dump the content of an assembly.
The next step is to modify the drawing of the classes. Class informations are dumped line by line. It will be easy to calculate the height of the blue square.