I need to write my application using Borland C++ but I want to use LabVIEW toolkits for analysis. I have been doing some initial investigations into how I can link the LabVIEW into my C++ code. I have been successful in being able to create a LabVIEW dll and then call that from my C++ code and set the LabVIEW window as a child of my C++ window by calling the 'FindWindowA' function of the Windows API from within LabVIEW to supply my C++ code with a handle to the window.
I thought I'd done the tricky part until I then tried to make my LabVIEW test VI a little more realistic - so instead of just suppling the handle to itself, I wanted it to sit in a loop taking commands until I was finished with it. This is where I am running in to problems. If I have just the one VI with the 'doing something' loop in it as well as passing the handle, my C++ code waits until the VI is closed before passing the handle. I've tried splitting my LabVIEW code into the 'do something' VI, with the window I want to embed in C++, and a second VI which loads the 'do something' VI and which also returns the handle. When I run this in LabVIEW it acts I as I'd intended but when calling from C++ no window appears.
So, to try and clarify, from C++ I want to get a handle to a LabVIEW VI with a front panel that I will eventually display graphs and which the user will need to make selections and press buttons on. I want to use that handle to set the LabVIEW window as a child of my C++ window, and then I want that VI to keep running until the user selects to close it.
I've attached the LabVIEW code - I don't think the C++ code will be of much use here but I can give details if necessary.
Thanks in advance for any help.
CAS