LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

LabWindows/CVI panel handle question

In debugging a multi-panel GUI application, I noticed that several of the panel handles were not unique. Is this normal??? Is there a way to guarantee unique panel handles to be returned when using the LoadPanel() command for different PanelResourceIDs? Thanks,

aj
0 Kudos
Message 1 of 5
(4,282 Views)
I don't see how it would be possible for duplicate handle values to be assigned. Looking at functions like HidePanel(), DiscardPanel() and similar ones, they only take a single handle parameter. The only way I can see functions like that working would be if all handles assigned were unique.

Are you sure you are seeing duplicate handle values?
Martin Fredrickson
Test Engineer

Northrop Grumman
Advanced Systems and Products
San Diego, CA 92128
0 Kudos
Message 2 of 5
(4,272 Views)
thanks for the reply. I am seeing duplicate panel handles because I was inadvertantly closing my panels out, thereby freeing the panel handle to be used by new panel as it loads. I am going to fix that this morning by loading all my panels at startup & thereafter using the HidePanel & DisplayPanel functions. I appreciate your response.
0 Kudos
Message 3 of 5
(4,253 Views)
Ah, now that makes sense. Loading and unloading panels would definitely have the effect you were seeing. You will probably have better performance as a result of doing things with HidePanel but then again you might not. It will all depend on how much memory your machine has and how many panels you are using.
Martin Fredrickson
Test Engineer

Northrop Grumman
Advanced Systems and Products
San Diego, CA 92128
0 Kudos
Message 4 of 5
(4,242 Views)
thanks again. I modified my code this morning to load all panels up front. I had some side effects as a result of that, associated w/ the radio controls on the panel. Though I realize that loading a panel each time it's called up is probably not optimum, I went back to that approach & the side effects w/ my panel controls disappeared. I think I'll stick w/ this model for now, unless there is a compelling reason not too. I could fix the side effects but I'm not sure the time is justified when it seems to work fine as is. Right now, each time a panel is called up, I load it, manipulate the control settings, display & then then discard the panel when the user clicks a "Done" button. My panels don't have large groups of data associated w/ them so the time to load/discard them doesn't appear to be an unecessary load on system resources. Thanks for your time & help.
0 Kudos
Message 5 of 5
(4,231 Views)