LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get a ControlID from a CVI aplication

I have a CVI application (A),   I want to development a new application useing CVI  to achieve some aims as follows.

1.  Call applicatin A and run it

2.  Get some Control ID and menu ID from application A

3.  Send commond to control the runstates of application  A. For exmple: simulation mouse click、change the value of a Numeric Control etc...

4.  Close Application A.

 

I  tried use some functions as follows,but failing.

 FindWindow();

FindWindowEx();

SendMessage();

 

I couldnot get the control ID via PE explorer.

 How do I??

 

Thanks!

0 Kudos
Message 1 of 2
(3,000 Views)
Hi Captain, There are rumors about some Windows SDK functions and 3rd party libraries that can be used for sending mouse and keyboard commands from an application to another but I've never tried myself. However, in my opinion, getting the values of a control or menu ID is beyond the capabilities of even such methods. For such a facility your application A must be "aware" of the situation (that it can be asked about such ID's). In my experience I managed to do it with DDE library of CVI. For this, you add some code to application A to start a DDE server and a callback function to process incoming requests. Then, from the new application you send DDE requests to application A which can reply with the appropriate data according to the command you sent in the request. There is an example in CVI samples folder for DDE. Check it out.
S. Eren BALCI
IMESTEK
0 Kudos
Message 2 of 2
(2,985 Views)