LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to send a command from a vc++.exe to LABVIEW.exe in order to control the button on the LABVIEW.exe

Hello, everyone. Using VC++, I have gotten the handle of a *.exe(built by Labview), but I cannot get the button handle. I want to get the button handle and post the message to control the button. How can I do that? When I use the SPY++, the *.exe(built by Labview) have not any child windows which is very different from the *.exe(built by VC++). In SPY++, what is the LVDChild class? How can I send the message to control the button on *.exe(built by Labview)???

 

That is  to send a command from a vc++.exe to LABVIEW.exe in order to control the button on the LABVIEW.exe. How can I get it ?

Thank you!

 

0 Kudos
Message 1 of 4
(2,803 Views)

"hummingbird" <x@no.email> wrote in message news:1165999208670-453351@exchange.ni.com...
Hello, everyone. Using VC++, I have gotten the handle of a *.exe(built by Labview), but I cannot get the button handle. I want to get the button handle and post the message to control the button. How can I do that? When I use the SPY++, the *.exe(built by Labview) have not any child windows which is very different from the *.exe(built by VC++). In SPY++, what is the LVDChild class? How can I send the message to control the button on *.exe(built by Labview)???


&nbsp;


That is &nbsp;to send a command from a vc++.exe to LABVIEW.exe in order to control the button on the LABVIEW.exe. How can I get it ?


Thank you!


&nbsp;


Duplicate post... Duplicate awnser:




LabVIEW doesn't use windows controls (so it can be platform independent). So you can't send messages to a button to click a button. You could send mouse click events to the window.


The proper way to do it would be to open an application reference (with ActiveX) to the LabVIEW exe, and get a vi reference, and use vi server to raise a value signalling event. That is all new to me though.


Regards,


Wiebe.
0 Kudos
Message 2 of 4
(2,792 Views)
Thank you! But I dont kown how to use vi server to raise a value signalling event. Can we put vi server into the vc program? Can you give me some more information or some examples, hehe!
 
hummingbird
0 Kudos
Message 3 of 4
(2,769 Views)


@hummingbird wrote:
Thank you! But I dont kown how to use vi server to raise a value signalling event. Can we put vi server into the vc program? Can you give me some more information or some examples, hehe!
 
hummingbird



Checkout the LabVIEW ActiveX server interface in the User Manual in Chapter 20, Windows Connectivity and the VI Server Reference in Chapter 17, Programmatically Controlling VIs.

There is a sample for Visual Basic under examples/comm/VBtoLV.frm, which should be quite simple to translate to Visual C as long as you can figure out the basics of ActiveX programming in VC (I have never done anything with ActiveX in VC). For those basics I would recommend some text book or MSDN.

Rolf Kalbermatter 

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 4
(2,753 Views)