LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Panel ,Pop-up or Menu bar handle is Invalid

Dear all ,
 
In my project I have used two panels .
Now when I am in the second Panel having a key press Event and getting its ASCII value I have called a user-defined function there I called
SetCtrlAAttribute(panel,....,.....,....) ; . Where panel is second Panel .Now during run time I see NON FATAL ERROR "panel ,pop-up or menu bar handle is invalid ".
But if I replace panel by panelHandle that is Panel one then in run time there is no such error .But I need to use second panel in my application . Plz reply what to do now ? 
 
subrata
0 Kudos
Message 1 of 2
(4,622 Views)
Normally this kind of error originates on the value of "panel" being invalid or not referencing the panel you intend to. In all SetCtrlxxx functions you must pass to the function the handle of the panel on which the control addressed is laying, not the panel name nor any other value. So, check that in your code you are saving the panel handle returned by LoadPanel or CreatePanel and you are using it throughout your function. In case of doubt you could set a breakpoint when loading the panel and see the handle value, next set a breakpoint on the line on error and check that the value of your "panel" variable is the corect one.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(4,619 Views)