LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to integrate LabVIEW in VC Window

I have a VC++ application, and want to integrate some LV VIs with GUI.  I built VIs in DLL and make them top most, but as LV engine and VC++ are in different thread, the LV window can not be always on top.  So the user may not find the LV window if the VC window is on top.
 
I am thinking to open a window in VC and let LV VI to set it as parent window.  But some initial try shows strange effects.  Is there any example or document on integrating VI windows in VC applications?
 
Thanks.
0 Kudos
Message 1 of 4
(2,964 Views)


@Ex-NISH2 wrote:
I have a VC++ application, and want to integrate some LV VIs with GUI.  I built VIs in DLL and make them top most, but as LV engine and VC++ are in different thread, the LV window can not be always on top.  So the user may not find the LV window if the VC window is on top.
 
I am thinking to open a window in VC and let LV VI to set it as parent window.  But some initial try shows strange effects.  Is there any example or document on integrating VI windows in VC applications?
 
Thanks.


I've never parented a LabVIEW window with another external window but did the opposite. I put an external window from another application as a child into a LabVIEW window. That worked perfect you just have to make sure LabVIEW does not have things on the front panel in the area where you place the external window. That is because the parent window drawing will be clipped by the area that is used by the child window and always be overdrawn completely by the child.

You probably have a similar problem in the opposite direction.  LabVIEW is free to draw anywhere in its window and will do so and the parent will be normally prevented to draw anything in the area covered by the child unless it uses some dirty direct screen blitting.

Rolf Kalbermatter

Message Edited by rolfk on 04-14-2007 10:11 PM

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 4
(2,920 Views)
We had too add force update the indicators, such as intensity plot in the LV window.  Finally, we gave up due to lake of decent ways.  Hope it can be covered in LabVIEW 9
0 Kudos
Message 3 of 4
(2,904 Views)


@Ex-NISH2 wrote:
We had too add force update the indicators, such as intensity plot in the LV window.  Finally, we gave up due to lake of decent ways.  Hope it can be covered in LabVIEW 9

That might be difficult. LabVIEWs window message queue is a bit involved in order to allow for seemless multithreading under Windows. I guess part of this might be the reason for your trouble. Apparently when parenting a LabVIEW window with some other window the message loop seems to get disturbed somehow. It also could be a bad interaction between the message loop handling of your C++ app (are you using MFC for that) and LabVIEWs own. If you use MFC I wouldn't be suprprised at all since the MFC library comes from Win3.1 times and they did in there hacks to make it work, where LabVIEWs message loop handling is straight forward in comparison.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 4 of 4
(2,898 Views)