LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with graph legends in Labwindows

Hi,
I have a problem with the legend.fp on LabWIndows\CVI 5.5.
I have a main panel (p1), that is always displayed during the programm execution, and another (p2) that I load on the same time than p1, but I only display it when needed.
On p2, I have a graph, create a legend for this graph and set the parameters, that works all fine, but:
- If I want to set the legend attributes again, I get the following error: LG_ERR_CANNOT_GET_LEGEND_DATA.
- If I close the application, I got an general protection fault.

Please can someone help...
Thanks.
0 Kudos
Message 1 of 4
(3,215 Views)
Hello

Were you having the same problem while running the graph legends example? You can find the example under ..\samples\userint\custctrl\legend.

if you are still having problems, perhaps you could post a part of your project here so i can have a look at it.

Thanks

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 4
(3,215 Views)
Hello

I have no problem with the exemple.
I also have no problems if I copy my graph on my main panel and do all the same (adapting of course the panel and controls names).
The problems only occur if I do that on my second panel. The begin works fine, but when I want to do some more operations, it seems that some parameters get lost and when I use another LG command, it returns the error i named. I tried many maners to manage my legend, so as working around with other LG functions, also tried setting my second panel active before calling the functions, or to load the 2nd panel as a child of my main panel... nothing worked.
It only works if I have my graph and legend on my main panel, or on a panel displayed and activated with the InstallPopup function.
But I
need 2 different panels that work together (that is to say, no panel as a modal dialog box as with InstallPopup).

I hope you'll be able to answer with the details i gave. It will take a little bit more time to extract the part from my project...

Thanks.
0 Kudos
Message 3 of 4
(3,215 Views)
Hello

I have made an extract of my project, where these kind of problems occur. While doing it, I have found were the problem could be. It seems to come from the GetScaledPanelDisplayBitmap function called through my Graph_Execute(SAVE, 0, ""); function call (if you comment this call out, all works fine).

As an attachement you will find my project.
Do following from the Project window: Run -> Debug Test_dbg.exe
Then click on the Button "Another Curve", there will be a FATAL ERROR...
If instead you just click on the "Close" Button, an NON FATAL ERROR occurs.

What can I do so that all works fine when using the
GetScaledPanelDisplayBitmap function and graph legend?

Thanks in advance for the answer you may give.

Rac.
(using LabWindows\CVI 5.5.
1 on Win2000)
0 Kudos
Message 4 of 4
(3,215 Views)