LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how to know the file type of a pop-up graph

Hello:
I'm using labwindowscvi5.0.1 to do some work.Now I encounter trouble when I want to transmit a graph created by cvi on the net.The graph is created by function YGraphPopup,the tree of this function is User Interface Library-->Pop-up Panels-->Y Graph Popup.I have call this function in the VC++ 6.0 by using MFC successfully,but I want to transmit this pop-up graph to another computer on the net through winsock protocal,so I must know the file type of this graph such as gif or jpeg etc.And I also feel puzzle that the function return an int value used to indicate if the function call is successful,so I want to know how can I get this graph file.It took me large energy and much time to seek the solution,but I
failed.If you know,please tell me as quickly as possible,thank you very much.
0 Kudos
Message 1 of 2
(2,999 Views)
I'm not really sure about how or why exactly you are trying to transmit the YGraphPopup across the net, so to get more specific you would have to answer the following:

Are you trying to transmit it to another computer that will be running another CVI or VC++ developed app that could possibly call the YGraphPopup function itself to display the data? Or are you merely wanting to send only a picture of the graph across the net?

In any situation this would be a very good reason to obtain the latest version of CVI because of its added support for DataSocket. With DataSocket it is easy to design apps both in CVI and VC++ that can share data across a network exactly the way you want for the YGraphPopup and even makes it relatively easy to transmit any binary stream that could also represent the contents of an image file. For more information on DataSocket visit the following site:

http://www.ni.com/datasocket/

Now to pose some possible solutions with Winsock:

If you are going to have another app on the other computer that you to have control over the development process for, I would suggest just sending the Y Array data for the YGraphPopup function across the net so that when the remote app receives it, it can call YGraphPopup on the same data to redisplay it.

If you are just wanting to transmit a picture of the YGraphPopup graph to the other computer, then you will have to find some way to possibly do a screen capture of the popup window with some Windows SDK functions (if there are any), because CVI (and its libraries) does not provide a mechanism to do this with the YGraphPopup window. In order to do something similar to this solely from CVI functionality you would have to design a UIR in CVI that has a graph on it, in which you could call the GetPanelDisplayBitmap to obtain a bitmap of the graph. Then again with this method you will still have to figure out how to transmit a bitmap via Winsock, which may be difficult.

Jason F.
Applications Engineer
National Instruments
www.ni.com/ask
0 Kudos
Message 2 of 2
(2,999 Views)