LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

LoadMovableCtrlSettings gives Invalid Control ID Error

Hello
 
I am calling the function LoadMovableCtrlSettings which is giving an Error ie Invaild Control ID when i pass a handle which returned by NewPanel function.
 
Piece of Code:
 
first save the settings
SaveMovableCtrlSettings (ActivePanel, -1, "custctrl"); //Saved moveable control settings
 
then called
 newpanelID = NewPanel(0,panelHandle,"Animation",50,50,700,1000) ;
DisplayPanel(newpanelID); //Works fine till here
 cnt = LoadMovableCtrlSettings (newpanelID,2,"custctrl"); //Gives error: Invalid Control ID. Why???????????
 
Looking for help...
 
Thanks
Rakesh
 
 
//Also tried with DuplicatePanel,LoadPanel but same error.......
 
 
 
 
0 Kudos
Message 1 of 2
(2,690 Views)
Rakesh,

It looks like your error is complaining because you are passing 2 as the ID of the control to load settings for, when your panel actually has no controls on it. LoadMovableCtrlSettings will not add controls to a panel, but instead is meant to apply settings previously saved for a particular control (or controls) on a panel. If you want to apply the settings from the file to a new panel that you create, you will need to use LoadPanel to create the new panel; this will ensure that the control IDs of the newly-created panel are the same as the ones saved by SaveMovableCtrlSettings.

Hope this helps.

Mert A.
National Instruments
0 Kudos
Message 2 of 2
(2,682 Views)