Could PCB-Investigator been added into a MFC program?

We's testint the PCB-Investigator, we need use PCB-investigator by code. We had seen your "DEMO_C++",It's a CLR program. We need use a MFC program,we only take a blank MFC program for test, and enable CLR support,it's ok. But after we added"PCB-Invertigator" In framework, and build, it generated many error,such as,C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\wingdi.h(4548): error C2365: “Polygon”: redefined. Could you tell us the reason or PCB-I can't be used in MFC?Thanks.

Hello,
this looks like the same namespace is included in windgdi.h and PCB-I, we have also a Polygon class internal.
I have tried to reproduce your error and created a new MFCApplication with Visual Studio Wizzard, by two tests with different GUIs it was no problem to add PCB-I and show a instance of our mainwindow.
here is the sourcecode: http://www.easylogix.de/download/Examples/MFCApplicationExamplePCBI.zip
Hope this helps
Fabio

Hello,
PCB-Investigator can be used in MFC applications. The C++ Demo is not updated yet. This contains older version of PCB-Investigator with .NET framework 4.0 now we use .NET framework 4.5.

You can create as many IPCBIWindow instances as you need. I update the C++ demo to work with new PCB-Investigator version later today.

you can use one instance in each controler:
private: PCBI::Automation::IPCBIWindow^ windowParent;
...
windowParent = PCBI::Automation::IAutomation::CreateNewPCBIWindow(true, false); //you can create new windows visible or not, if you only want to use PCB-I in the backround you havent to show it.

With this instances you can handle different data sets in each view.

Hope this helps
Regards
Fabio

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.